package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

final class zbr {
   private static double a = 0.98D;
   private static double b = 1.0E-10D;

   static void a(zn var0, zbp var1, com.aspose.cells.b.a.b.zp var2, boolean var3, zbcq var4) {
      if (!zbuk.a(var2)) {
         if (var1.w().g() || var1.A().g()) {
            boolean var5 = false;
            int var29;
            if (var3) {
               if (var1.g() != 0 && var1.g() != 2) {
                  var29 = var2.e();
               } else {
                  var29 = var2.f();
               }
            } else if (var1.g() != 0 && var1.g() != 2) {
               var29 = var2.f();
            } else {
               var29 = var2.e();
            }

            double var6 = 0.0D;
            boolean var8 = var1.k() == 2 && (var1.g() == 0 || var1.g() == 2);
            if (var4.av()) {
               var8 = false;
            }

            double var9 = var1.n() ? var1.g(var1.z()) : var1.z();
            double var15 = var1.n() ? var1.g(var1.x()) : var1.x();
            double var11;
            double var13;
            if (var4.av() || var1.g() != 0 && var1.g() != 2) {
               var11 = var1.n() ? var1.g(var1.z()) : var1.z();
               var13 = var1.n() ? var1.g(var1.D()) : var1.D();
               var6 = (double)var29 / (var11 - var13);
            } else {
               var11 = (double)((int)var1.z());
               var13 = (double)((int)var1.D());
               int var17;
               if (var8) {
                  if (!var1.e().e().f() && !var1.e().u()) {
                     var17 = a(var1.j(), (int)var11, (int)var13, var1.e().X());
                     if (var17 == 0) {
                        var17 = 1;
                     }
                  } else {
                     var17 = a(var1.j(), (int)var11, (int)var13, var1.e().X()) + 1;
                     var9 = (double)a(var1.j(), var1.y(), 1, (int)var9, var1.e().X());
                  }
               } else if (!var1.e().e().f() && !var1.e().u()) {
                  var17 = (int)var11 - (int)var13;
                  if (var17 == 0) {
                     var17 = 1;
                  }
               } else {
                  var17 = (int)var11 - (int)var13 + 1;
                  ++var9;
               }

               var6 = (double)var29 / (double)var17;
            }

            double var22;
            int var24;
            int var25;
            double var30;
            if (var1.w().g() && var15 > 0.0D) {
               var30 = var13;
               int var21 = zbuk.g(var15);
               var22 = zbuk.a(var13, var21);

               for(var24 = 1; var22 <= var9; ++var24) {
                  double var19;
                  if (var8) {
                     var25 = a(var1.j(), (int)var30, (int)var13, var1.e().X());
                     var19 = var6 * (double)var25;
                  } else {
                     var19 = var6 * (var30 - var13);
                  }

                  if (!var1.e().B().d().m() || var22 != var13 && var22 != var9) {
                     if (var3) {
                        if (var1.g() != 0 && var1.g() != 2) {
                           if (var1.p()) {
                              var1.w().a((float)((double)var2.i() - var19), (float)var2.d(), (float)((double)var2.i() - var19), (float)var2.j());
                           } else {
                              var1.w().a((float)((double)var2.c() + var19), (float)var2.d(), (float)((double)var2.c() + var19), (float)var2.j());
                           }
                        } else if (var1.p()) {
                           var1.w().a((float)var2.c(), (float)((double)var2.d() + var19), (float)var2.i(), (float)((double)var2.d() + var19));
                        } else {
                           var1.w().a((float)var2.c(), (float)((double)var2.j() - var19), (float)var2.i(), (float)((double)var2.j() - var19));
                        }
                     } else if (var1.g() != 0 && var1.g() != 2) {
                        if (var1.p()) {
                           var1.w().a((float)var2.c(), (float)((double)var2.d() + var19), (float)var2.i(), (float)((double)var2.d() + var19));
                        } else {
                           var1.w().a((float)var2.c(), (float)((double)var2.j() - var19), (float)var2.i(), (float)((double)var2.j() - var19));
                        }
                     } else if (var1.p()) {
                        var1.w().a((float)((double)var2.i() - var19), (float)var2.d(), (float)((double)var2.i() - var19), (float)var2.j());
                     } else {
                        var1.w().a((float)((double)var2.c() + var19), (float)var2.d(), (float)((double)var2.c() + var19), (float)var2.j());
                     }
                  }

                  if (var8) {
                     var30 = (double)a(var1.j(), var1.y(), (int)var15, (int)var30, var1.e().X());
                     var22 = zbuk.a(var30, var21);
                  } else if (var4.av() || var1.g() != 0 && var1.g() != 2) {
                     var30 = var13 + (double)var24 * var15;
                     var22 = zbuk.a(var30, var21);
                  } else {
                     var30 += var15 * (double)var1.Q();
                     var22 = zbuk.a(var30, var21);
                  }
               }
            }

            double var31;
            int var32;
            if (!var1.n()) {
               var30 = var1.B();
               if (var1.A().g() && var30 > 0.0D) {
                  var32 = 0;
                  if (var8) {
                     int var20 = a(var1.j(), var1.y(), (int)var15, (int)var13, var1.e().X());
                     var32 = a(var1.j(), var20, (int)var13, var1.e().X());
                  }

                  var31 = var13;

                  while(true) {
                     while(var31 <= var9) {
                        boolean var33 = false;
                        if (var8) {
                           var25 = a(var1.j(), (int)var31, (int)var13, var1.e().X());
                           var22 = var6 * (double)var25;
                           if (var25 % var32 == 0 && var1.w().g()) {
                              var33 = true;
                           }
                        } else {
                           var22 = var6 * (var31 - var13);
                           if (zbuk.a(var31, var13) % var15 == 0.0D && var1.w().g()) {
                              var33 = true;
                           }
                        }

                        if ((!var1.e().B().d().m() || var31 != var13 && var31 != var9) && !var33) {
                           if (var3) {
                              if (var1.g() != 0 && var1.g() != 2) {
                                 if (var1.p()) {
                                    var1.A().a((float)((double)var2.i() - var22), (float)var2.d(), (float)((double)var2.i() - var22), (float)var2.j());
                                 } else {
                                    var1.A().a((float)((double)var2.c() + var22), (float)var2.d(), (float)((double)var2.c() + var22), (float)var2.j());
                                 }
                              } else if (var1.p()) {
                                 var1.A().a((float)var2.c(), (float)((double)var2.d() + var22), (float)var2.i(), (float)((double)var2.d() + var22));
                              } else {
                                 var1.A().a((float)var2.c(), (float)((double)var2.j() - var22), (float)var2.i(), (float)((double)var2.j() - var22));
                              }
                           } else if (var1.g() != 0 && var1.g() != 2) {
                              if (var1.p()) {
                                 var1.A().a((float)var2.c(), (float)((double)var2.d() + var22), (float)var2.i(), (float)((double)var2.d() + var22));
                              } else {
                                 var1.A().a((float)var2.c(), (float)((double)var2.j() - var22), (float)var2.i(), (float)((double)var2.j() - var22));
                              }
                           } else if (var1.p()) {
                              var1.A().a((float)((double)var2.i() - var22), (float)var2.d(), (float)((double)var2.i() - var22), (float)var2.j());
                           } else {
                              var1.A().a((float)((double)var2.c() + var22), (float)var2.d(), (float)((double)var2.c() + var22), (float)var2.j());
                           }
                        }

                        if (var8) {
                           var31 = (double)a(var1.j(), var1.C(), (int)var30, (int)var31, var1.e().X());
                        } else if (var4.av() || var1.g() != 0 && var1.g() != 2) {
                           var31 = zbuk.b(var31, var30);
                        } else {
                           var31 += var30 * (double)var1.Q();
                        }
                     }

                     return;
                  }
               }
            } else {
               var30 = var1.B();
               var32 = zbuk.h(var30);
               var31 = var1.n() ? var1.g(var30) : var30;
               if (var1.A().g() && var30 > 0.0D) {
                  for(var22 = var13; var22 <= var9 + var31; var22 = zbuk.b(var22, var31)) {
                     for(var24 = 1; var24 <= 10; ++var24) {
                        double var34 = Math.pow((double)var24, (double)var32) * Math.pow(10.0D, var22);
                        var34 = var1.g(var34);
                        if ((var24 != 1 || var22 == var13) && var34 <= var9) {
                           double var27 = var6 * (var34 - var13);
                           if (var3) {
                              if (var1.g() != 0 && var1.g() != 2) {
                                 if (var1.p()) {
                                    var1.A().a((float)((double)var2.i() - var27), (float)var2.d(), (float)((double)var2.i() - var27), (float)var2.j());
                                 } else {
                                    var1.A().a((float)((double)var2.c() + var27), (float)var2.d(), (float)((double)var2.c() + var27), (float)var2.j());
                                 }
                              } else if (var1.p()) {
                                 var1.A().a((float)var2.c(), (float)((double)var2.d() + var27), (float)var2.i(), (float)((double)var2.d() + var27));
                              } else {
                                 var1.A().a((float)var2.c(), (float)((double)var2.j() - var27), (float)var2.i(), (float)((double)var2.j() - var27));
                              }
                           } else if (var1.g() != 0 && var1.g() != 2) {
                              if (var1.p()) {
                                 var1.A().a((float)var2.c(), (float)((double)var2.d() + var27), (float)var2.i(), (float)((double)var2.d() + var27));
                              } else {
                                 var1.A().a((float)var2.c(), (float)((double)var2.j() - var27), (float)var2.i(), (float)((double)var2.j() - var27));
                              }
                           } else if (var1.p()) {
                              var1.A().a((float)((double)var2.i() - var27), (float)var2.d(), (float)((double)var2.i() - var27), (float)var2.j());
                           } else {
                              var1.A().a((float)((double)var2.c() + var27), (float)var2.d(), (float)((double)var2.c() + var27), (float)var2.j());
                           }
                        }
                     }
                  }
               }
            }

         }
      }
   }

   static void a(zn var0, zbp var1, com.aspose.cells.b.a.b.zp var2, int var3) {
      if (!zbuk.a(var2)) {
         double var4 = 6.283185307179586D / (double)var3;
         double var6 = (double)var2.c() + (double)var2.e() / 2.0D;
         double var8 = (double)var2.d() + (double)var2.f() / 2.0D;
         new com.aspose.cells.b.a.b.zo((float)var6, (float)var8);
         double var13 = (double)(var2.e() / 2);
         double var33;
         com.aspose.cells.b.a.b.zo var35;
         double var36;
         double var38;
         double var11;
         double var15;
         double var17;
         double var19;
         double var21;
         double var23;
         double var25;
         double var27;
         com.aspose.cells.b.a.b.zo var29;
         int var30;
         double var31;
         if (var1.e().a && var1 == var1.e().G()) {
            var15 = 0.0D;
            var17 = var1.n() ? var1.g(var1.b) : var1.b;
            var19 = var1.n() ? var1.g(var1.c) : var1.c;
            var21 = var1.n() ? var1.g(var1.d) : var1.d;
            var23 = var1.n() ? var1.g(var1.e) : var1.e;
            if (var21 > 0.0D) {
               for(var25 = var19 + var21; var25 <= var17; var25 = zbuk.b(var25, var21)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.w().g()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           var1.w().a(var35, var29);
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }

            if (var23 > 0.0D) {
               for(var25 = var19 + var23; var25 <= var17; var25 = zbuk.b(var25, var23)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.A().g()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           var1.A().a(var35, var29);
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }
         } else {
            var15 = 0.0D;
            var17 = var1.V();
            var19 = var1.W();
            var21 = var1.Y();
            var23 = var1.Z();
            if (var21 > 0.0D) {
               for(var25 = var19 + var21; var25 <= var17; var25 = zbuk.b(var25, var21)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.w().g()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           var1.w().a(var35, var29);
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }

            if (var23 > 0.0D) {
               for(var25 = var19 + var23; var25 <= var17; var25 = zbuk.b(var25, var23)) {
                  var15 = Math.abs(var25 - var19);
                  var27 = var13 * var15 / (var17 - var19);
                  var11 = 1.5707963267948966D;
                  var29 = com.aspose.cells.b.a.b.zo.a();

                  for(var30 = 0; var30 < var3; ++var30) {
                     if (var1.A().g()) {
                        var31 = var6 + var27 * Math.cos(var11);
                        var33 = var8 - var27 * Math.sin(var11);
                        var35 = new com.aspose.cells.b.a.b.zo((float)var31, (float)var33);
                        if (var30 == 0) {
                           var36 = var6 + var27 * Math.cos(var11 + var4);
                           var38 = var8 - var27 * Math.sin(var11 + var4);
                           var29 = new com.aspose.cells.b.a.b.zo((float)var36, (float)var38);
                        }

                        if (Math.abs(var35.d() - var29.d()) > 1.0F || Math.abs(var35.e() - var29.e()) > 1.0F) {
                           var1.A().a(var35, var29);
                           var29 = var35;
                        }
                     }

                     var11 -= var4;
                  }
               }
            }
         }

      }
   }

   static void a(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcq var5) throws Exception {
      if (!zbuk.a(var4)) {
         zig var6 = var1.e();
         int var7 = var5.ah();
         zbtk var8 = var1.J();
         zje var9 = var5.E().b(0);
         String var10 = var9.z();
         boolean var11 = var9.A();
         boolean var12 = false;
         if (var8.h() && var9 != null) {
            var12 = true;
         }

         var1.l().a(var3, (float)var4.d(), var3, (float)var4.j());
         zrn var13 = var1.T();
         byte var14 = 8;
         float var15 = 0.0F;
         float var16 = (float)(2 * var1.aa() + var1.ac());
         float var17 = var1.g / 2.0F;
         if (var1.m == 1) {
            var15 = (float)var4.c() - var1.f;
            var13.b().b.a((int)var15 - var13.b().b.e());
         } else {
            float var10001;
            if (var1.m == 2) {
               var14 = 7;
               var15 = (float)var4.i();
               var15 += var16;
               var10001 = var15 + var1.f;
               var13.b().b.a((int)var10001);
            } else if (var1.m == 3) {
               if (var2) {
                  var14 = 7;
                  var15 = var3 + var16;
                  var10001 = var15 + var1.f;
                  var13.b().b.a((int)var10001);
               } else {
                  var15 = var3 - var1.f;
                  var13.b().b.a((int)var15 - var13.b().b.e());
               }
            }
         }

         var13.b().b.b(var4.d());
         ArrayList var18 = var1.l;
         double var19 = var1.n() ? var1.g(var1.z()) : var1.z();
         double var21 = var1.n() ? var1.g(var1.D()) : var1.D();
         double var23 = var1.n() ? var1.g(var1.x()) : var1.x();
         int var25 = zbuk.g(var23);
         int var26;
         double var27;
         String var32;
         Color var33;
         com.aspose.cells.b.a.b.zq var34;
         if (!var1.p()) {
            for(var26 = var18.size() - 1; var26 >= 0; --var26) {
               var27 = var21 + var23 * (double)(var18.size() - 1 - var26);
               if (var25 < 15) {
                  if (var26 - 1 > 0) {
                     if (Math.abs(zbuk.a(var23, Math.abs(zbuk.a(com.aspose.cells.b.a.ze.g(var18.get(var26)), com.aspose.cells.b.a.ze.g(var18.get(var26 - 1)))))) / var23 > b) {
                        continue;
                     }
                  } else if (var26 + 1 < var18.size() && Math.abs(zbuk.a(var23, Math.abs(zbuk.a(com.aspose.cells.b.a.ze.g(var18.get(var26)), com.aspose.cells.b.a.ze.g(var18.get(var26 + 1)))))) / var23 > b) {
                     continue;
                  }
               }

               float var29 = (float)((double)var4.d() + (var19 - var27) / (var19 - var21) * (double)var4.f());
               if (var1.m != 0) {
                  if (var25 < 15) {
                     var27 = zbuk.a(var27, var25);
                  }

                  double var30 = var1.n() ? var1.h(var27) : var27;
                  if (zia.b(var7)) {
                     var30 /= 100.0D;
                     var10 = "0%";
                  }

                  var32 = "";
                  var30 = var1.n() ? var30 : var30 * Math.pow(10.0D, var1.T().f());
                  var33 = var8.g();
                  if (var12) {
                     var32 = zpw.a(var6.al(), var30, var10, var11);
                     var33 = zpw.a(var30, var10, var33);
                  } else {
                     var32 = a((zbp)var1, (Object)var30);
                     var33 = zpw.a(var30, var8.b(), var33);
                  }

                  var34 = new com.aspose.cells.b.a.b.zq(var15, var29 - var17, var1.f - var16, var1.g);
                  a(var1, var32, var34);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var34), var32, var8.d(), var8.a(), var33, var14, 1, com.aspose.cells.b.a.b.zv.c());
               }

               a(var0, var1, var2, var3, var29);
            }
         } else {
            for(var26 = 0; var26 < var18.size(); ++var26) {
               var27 = com.aspose.cells.b.a.ze.g(var18.get(var26));
               double var35 = var1.n() ? var1.h(var27) : var27;
               if (var26 - 1 > 0) {
                  if (Math.abs(zbuk.a(var23, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var18.get(var26 - 1)))))) / var23 > b) {
                     continue;
                  }
               } else if (var26 + 1 < var18.size() && Math.abs(zbuk.a(var23, Math.abs(zbuk.a(var27, com.aspose.cells.b.a.ze.g(var18.get(var26 + 1)))))) / var23 > b) {
                  continue;
               }

               float var31 = (float)((double)var4.d() + (var27 - var1.D()) / (var1.z() - var1.D()) * (double)var4.f());
               if (var1.m != 0) {
                  if (zia.b(var7)) {
                     var35 /= 100.0D;
                     var10 = "0%";
                  }

                  var32 = "";
                  var35 = var1.n() ? var35 : var35 * Math.pow(10.0D, var1.T().f());
                  var33 = var8.g();
                  if (var12) {
                     var32 = zpw.a(var6.al(), var35, var10, var11);
                     var33 = zpw.a(var35, var10, var33);
                  } else {
                     var32 = a((zbp)var1, (Object)var35);
                     var33 = zpw.a(var35, var8.b(), var33);
                  }

                  var34 = new com.aspose.cells.b.a.b.zq(var15, var31 - var17, var1.f - var16, var1.g);
                  a(var1, var32, var34);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var34), var32, var8.d(), var8.a(), var33, var14, 1, com.aspose.cells.b.a.b.zv.c());
               }

               a(var0, var1, var2, var3, var31);
            }
         }

         a(var0, var1, var2, var3, (float)var4.d(), (float)var4.j());
         var13.m();
      }
   }

   private static void a(zbp var0, String var1, com.aspose.cells.b.a.b.zq var2) {
      if (var0.m().h() != 0) {
         zn var3 = var0.e().ap();
         zbtk var4 = var0.J();
         com.aspose.cells.b.a.b.zs var5 = zbsq.a(var3, var1, var4.d(), var4.a(), (com.aspose.cells.b.a.b.zs)var0.e().B().b.b(), 1, 1);
         com.aspose.cells.b.a.b.zq var6 = com.aspose.cells.b.a.b.zq.c();
         com.aspose.cells.b.a.b.zt var7;
         float var8;
         if (var4.d() == 0) {
            var7 = zbuk.a(var3, var1, var4.a(), var2.e());
            var8 = ((float)var5.b() - var7.b()) / 2.0F;
            var6 = new com.aspose.cells.b.a.b.zq(var2.f() + (var2.h() - var7.b()) - var8, var2.g() + (var2.i() - var7.c()), var7.b(), var7.c());
         } else if (Math.abs(var4.d()) % 90 == 0) {
            var7 = zbuk.a(var3, var1, var4.a(), new com.aspose.cells.b.a.b.zt(var2.i(), var2.h()));
            var8 = ((float)var5.c() - var7.b()) / 2.0F;
            var6 = new com.aspose.cells.b.a.b.zq(var2.f(), var2.g(), var7.c(), var7.b());
         } else {
            var6 = new com.aspose.cells.b.a.b.zq(var2.f(), var2.g(), var2.h(), var2.i());
         }

         var0.m().a(var6);
      }

   }

   private static void a(zn var0, zbp var1, boolean var2, float var3, float var4) {
      zbp var5 = a(var1);
      boolean var6 = false;
      boolean var7 = false;
      switch(var1.E()) {
      case 0:
         var6 = true;
         var7 = true;
         break;
      case 1:
         var6 = true;
         if (var2) {
            var6 = false;
            var7 = true;
         }

         if (var5.o) {
            if (var2) {
               var6 = true;
               var7 = false;
            } else {
               var6 = false;
               var7 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var7 = true;
         if (var2) {
            var7 = false;
            var6 = true;
         }

         if (var5.o) {
            if (!var2) {
               var6 = true;
               var7 = false;
            } else {
               var6 = false;
               var7 = true;
            }
         }
      }

      if (var6) {
         var1.l().a(var3, var4, var3 + (float)var1.aa(), var4);
      }

      if (var7) {
         var1.l().a(var3 - (float)var1.aa(), var4, var3, var4);
      }

   }

   private static void a(zn var0, zbp var1, boolean var2, float var3, float var4, float var5) {
      if (var1.F() != 2) {
         zbp var6 = a(var1);
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.F()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
            if (var2) {
               var7 = false;
               var8 = true;
            }

            if (var6.o) {
               if (var2) {
                  var7 = true;
                  var8 = false;
               } else {
                  var7 = false;
                  var8 = true;
               }
            }
         case 2:
         default:
            break;
         case 3:
            var8 = true;
            if (var2) {
               var8 = false;
               var7 = true;
            }

            if (var6.o) {
               if (!var2) {
                  var7 = true;
                  var8 = false;
               } else {
                  var7 = false;
                  var8 = true;
               }
            }
         }

         float var10 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var5 - var4));
         float var9;
         if (!var1.p()) {
            var9 = var5;
            var10 = -var10;
         } else {
            var9 = var4;
         }

         float var11 = var9;

         do {
            if (var7) {
               var1.l().a(var3, var11, var3 + (float)var1.ab(), var11);
            }

            if (var8) {
               var1.l().a(var3 - (float)var1.ab(), var11, var3, var11);
            }

            var11 += var10;
         } while(var4 <= var11 && var11 <= var5);

      }
   }

   static void a(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, int var5, boolean var6) throws Exception {
      if (!zbuk.a(var4)) {
         if (var1.k() == 2) {
            a(var0, var1, var2, var3, var4);
         } else {
            var1.l().a((float)var4.c(), var3, (float)var4.i(), var3);
            float var7 = 0.0F;
            byte var8 = 9;
            float var9 = (float)var1.J().k();
            if (var1.m != 0) {
               var9 += (float)(var1.aa() + var1.ab());
            }

            float var10 = 0.0F;
            if (var1.m == 1) {
               var7 = (float)var4.j() + var9;
               var10 = (float)var4.j() + var9;
            } else if (var1.m == 2) {
               var8 = 0;
               var7 = (float)var4.d() - var9 - var1.h;
               var10 = (float)var4.d() - var9;
            } else if (var1.m == 3) {
               if (var2) {
                  var7 = var3 - var9 - var1.h;
                  var10 = var3 - var9;
                  var8 = 0;
               } else {
                  var7 = var3 + var9;
                  var10 = var3 + var9;
               }
            }

            zig var11 = var1.e();
            zbcs var12 = var11.z();
            zbtk var13 = var1.J();
            ArrayList var14;
            ArrayList[] var15;
            if (var1.g() == 0) {
               var14 = var11.z().c();
               var15 = var11.z().e();
            } else {
               var14 = var11.z().d();
               var15 = var11.z().g();
            }

            zfp var16 = null;
            boolean var17 = true;
            if (var15 != null && var14 != null && var14.size() > 0) {
               var16 = (zfp)var14.get(0);
               if (!var1.K() && var1.H() > 0 && (var16.a() == null || var16.a().equals(""))) {
                  var17 = false;
               }
            }

            boolean var18 = false;
            if (var13.h() && var14.size() > 0) {
               var18 = true;
            }

            if (var15 != null && var15.length > 0 && var14.size() > 0) {
               var18 = true;
            }

            float var19 = 0.0F;
            int var20 = var5;
            if (var1.p) {
               var20 = (int)var1.z();
            }

            if (!var1.f() && !var11.u()) {
               var19 = (float)(var20 - 1);
               if (var19 == 0.0F) {
                  var19 = 1.0F;
               }

               if (var1.u) {
                  var19 += 0.5F;
               }
            } else {
               var19 = (float)var20;
            }

            double var21 = (double)var4.e() / (double)var19;
            com.aspose.cells.b.a.b.zt var23 = new com.aspose.cells.b.a.b.zt(var1.i, var1.h);
            float var24 = -1.0F;
            float var25 = -1.0F;

            float var50;
            for(int var26 = 0; var26 < var20; ++var26) {
               double var30 = (double)(var26 + 1) * var21;
               if (!var1.f() && !var1.e().u()) {
                  var30 -= var21 / 2.0D;
               }

               float var27;
               float var28;
               float var29;
               if (!var1.p()) {
                  var27 = (float)((double)var4.c() + (double)(var26 + 1) * var21);
                  var28 = (float)((double)var4.c() + var30 - var21);
                  var29 = (float)((double)var4.c() + var30 - var21 / 2.0D);
               } else {
                  var27 = (float)((double)(var4.c() + var4.e()) - (double)(var26 + 1) * var21);
                  var28 = (float)((double)(var4.c() + var4.e()) - var30);
                  var29 = (float)((double)(var4.c() + var4.e()) - var30 + var21 / 2.0D);
               }

               if (var1.m != 0 && var26 % var1.H() == 0 && var26 < var1.l.size() && var17) {
                  String var32 = "";
                  Color var33 = var13.g();
                  if (!var18) {
                     var32 = a(var1, var1.l.get(var26));
                     var33 = zpw.a(var1.l.get(var26), var13.b(), var33);
                  } else {
                     String var34 = "";
                     boolean var35 = false;
                     var34 = var26 < var14.size() ? ((zfp)var14.get(var26)).c() : "";
                     var35 = var26 < var14.size() ? ((zfp)var14.get(var26)).b() : false;
                     var32 = zpw.a(var11.al(), var1.l.get(var26), var34, var35);
                     var33 = zpw.a(var1.l.get(var26), var34, var33);
                  }

                  float var48 = var1.h;
                  com.aspose.cells.b.a.b.zs var51 = zbsq.a(var0, var32, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var23, 1, 1);
                  if ((float)var51.c() < var1.h) {
                     var48 = (float)var51.c();
                  }

                  com.aspose.cells.b.a.b.zq var36 = new com.aspose.cells.b.a.b.zq((float)((double)var28 + var21 / 2.0D - (double)(var1.i / 2.0F)), var7, var1.i, var48);
                  if (var13.d() != 0 && var13.d() != 90 && var13.d() != -90) {
                     if (var13.d() == 255) {
                        zbsq.a(var0, var32, var13.a(), var33, var29, var7, var1.i, var1.h, var1.G().e());
                     } else {
                        a(var11.ap(), var32, new com.aspose.cells.b.a.b.zo(var29, var10), new com.aspose.cells.b.a.b.zt(var1.i, var48), var13.d(), var13.a(), var33, var1.a());
                     }
                  } else {
                     byte var37 = 1;
                     byte var38 = 1;
                     if (var13.d() != 90 && var13.d() != -90) {
                        a(var1, var32, var36);
                        b(var0, com.aspose.cells.b.a.b.zp.a(var36), var32, var13.d(), var13.a(), var33, var37, var38);
                     } else {
                        com.aspose.cells.b.a.b.zs var39 = zbsq.a(var0, var32, var13.d(), var13.a(), (com.aspose.cells.b.a.b.zt)var36.e(), var37, var38);
                        com.aspose.cells.b.a.b.zt var40 = zbuk.a(var0, var32, var13.a(), new com.aspose.cells.b.a.b.zt(var36.i(), var36.h()));
                        com.aspose.cells.b.a.b.zq var41 = new com.aspose.cells.b.a.b.zq((float)((double)var28 + var21 / 2.0D - (double)(var39.b() / 2)), var7, (float)var39.b(), (float)var39.c());
                        var41.b(var41.g() - ((float)var39.c() - var40.b()) / 2.0F);
                        if (var41.h() < (float)var39.c()) {
                           var41.c(var40.c() + 1.0F);
                        }

                        a(var1, var32, var36);
                        b(var0, com.aspose.cells.b.a.b.zp.a(var41), var32, var13.d(), var13.a(), var33, var37, var38);
                     }
                  }
               }

               float var47;
               if (var26 == 0) {
                  if (!var1.p()) {
                     var47 = (float)var4.c();
                  } else {
                     var47 = (float)var4.i();
                  }

                  if (var47 >= (float)var4.c() && var47 <= (float)(var4.c() + var4.e())) {
                     a(var0, var1, var2, var47, var3, var4);
                  }

                  if (!var1.p()) {
                     var50 = var47 - (float)(var21 * (double)var1.Q() / 2.0D);
                  } else {
                     var50 = var47 + (float)(var21 * (double)var1.Q() / 2.0D);
                  }

                  if (var50 > (float)var4.c() && var50 < (float)(var4.c() + var4.e())) {
                     b(var0, var1, var2, var50, var3, var4);
                  }
               }

               if ((var26 + 1) % var1.Q() == 0) {
                  if (var27 >= (float)var4.c() && var27 <= (float)(var4.c() + var4.e()) && Math.abs(var24 - var27) > (float)var1.l().h() / 2.0F) {
                     a(var0, var1, var2, var27, var3, var4);
                     var24 = var27;
                  }

                  if (!var1.p()) {
                     var47 = var27 - (float)(var21 * (double)var1.Q() / 2.0D);
                  } else {
                     var47 = var27 + (float)(var21 * (double)var1.Q() / 2.0D);
                  }

                  if (var47 > (float)var4.c() && var47 < (float)(var4.c() + var4.e()) && Math.abs(var25 - var47) > (float)var1.l().h() / 2.0F) {
                     b(var0, var1, var2, var47, var3, var4);
                     var25 = var47;
                  }
               }
            }

            if (var15 != null && var15.length > 0 && var14.size() > 0 && var1.m != 0) {
               float var42 = (float)(var15.length + 1) * var9;
               ArrayList var43 = var15[0];
               zfp var44 = (zfp)var43.get(0);
               String var45 = zpw.a(var11.al(), var44.a(), var44.c(), var44.b());
               com.aspose.cells.b.a.b.zs var46 = zbsq.a(var1.e().ap(), var45, 0, var13.a(), (com.aspose.cells.b.a.b.zs)var4.b(), 1, 1);
               float var31 = 0.0F;
               boolean var49 = true;
               if (var1.m == 1) {
                  var7 = (float)var4.j() + var42 + var1.g;
                  var31 = (float)var4.j();
                  var49 = false;
               } else if (var1.m == 2) {
                  var7 = (float)var4.d() - var42 - var1.g;
                  var31 = (float)var4.d();
                  var49 = true;
               } else if (var1.m == 3) {
                  if (var2) {
                     var7 = var3 - var42 - var1.g + (float)var46.c();
                     var49 = true;
                  } else {
                     var7 = var3 + var42 + var1.g - (float)var46.c();
                     var49 = false;
                  }

                  var31 = var3;
               }

               if (!var1.p()) {
                  var50 = (float)var4.c();
               } else {
                  var50 = (float)var4.i();
               }

               a(var0, var15, var50, var7, var9, var49, var1, var21, var13, var8, var31, var4, var6);
            }

         }
      }
   }

   private static void a(zn var0, zbp var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbp var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.E()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         var1.l().a(var3, var4 - (float)var1.aa(), var3, var4);
      }

      if (var8) {
         var1.l().a(var3, var4, var3, var4 + (float)var1.aa());
      }

   }

   private static void b(zn var0, zbp var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbp var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.F()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         var1.l().a(var3, var4 - (float)var1.ab(), var3, var4);
      }

      if (var8) {
         var1.l().a(var3, var4, var3, var4 + (float)var1.ab());
      }

   }

   private static void a(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4) throws Exception {
      ArrayList var5 = var1.l;
      zig var6 = var1.e();
      var1.l().a((float)var4.c(), var3, (float)var4.i(), var3);
      float var7 = 0.0F;
      float var8 = (float)var1.J().k();
      if (var1.m != 0) {
         var8 += (float)var1.ab();
      }

      float var9 = 0.0F;
      if (var1.m == 1) {
         var7 = (float)var4.j() + var8;
         var9 = (float)var4.j() + var8;
      } else if (var1.m == 2) {
         var7 = (float)var4.d() - var8 - var1.h;
         var9 = (float)var4.d() - var8;
      } else if (var1.m == 3) {
         if (var2) {
            var7 = var3 - var8 - var1.h;
            var9 = var3 - var8;
         } else {
            var7 = var3 + var8;
            var9 = var3 + var8;
         }
      }

      zbtk var10 = var1.J();
      ArrayList var11;
      ArrayList[] var12;
      if (var1.g() == 0) {
         var11 = var6.z().c();
         var12 = var6.z().e();
      } else {
         var11 = var6.z().d();
         var12 = var6.z().g();
      }

      boolean var13 = false;
      if (var10.h() && var11.size() > 0) {
         var13 = true;
      }

      if (var12 != null && var12.length > 0 && var11.size() > 0) {
         var13 = true;
      }

      float var14 = 0.0F;
      int var15 = (int)var1.z();
      int var16 = (int)var1.D();
      int var17 = var1.j();
      if (!var6.e().f() && !var6.u()) {
         var14 = (float)a(var17, var15, var16, var1.e().X());
         if (var14 == 0.0F) {
            var14 = 1.0F;
         }

         if (var1.u) {
            var14 += 0.5F;
         }
      } else {
         var14 = (float)(a(var17, var15, var16, var1.e().X()) + 1);
      }

      double var18 = (double)var4.e() / (double)var14;
      float var20 = 0.0F;
      float var21 = 0.0F;
      float var22 = 0.0F;
      float var23 = 0.0F;
      if (var1.p()) {
         var23 = (float)(var4.c() + var4.e());
      } else {
         var23 = (float)var4.c();
      }

      com.aspose.cells.b.a.b.zt var24 = new com.aspose.cells.b.a.b.zt(var1.f, var1.h);

      int var27;
      for(int var25 = 0; var25 < var5.size(); ++var25) {
         int var26 = com.aspose.cells.b.a.ze.f(var1.l.get(var25));
         var27 = a(var17, var26, var16, var1.e().X());
         float var28 = (float)(var18 * (double)var27);
         var20 = (float)(var18 * (double)a(var17, a(var1.j(), var1.y(), (int)var1.x(), var26, var1.e().X()), var26, var1.e().X()));
         if (var1.f() || var6.u()) {
            var28 += (float)(var18 / 2.0D);
         }

         if (var1.p()) {
            var21 = (float)(var4.c() + var4.e()) - var28;
            var22 = var21;
            var23 -= var20;
         } else {
            var21 = (float)var4.c() + var28;
            var22 = var21;
            var23 += var20;
         }

         if (var1.m != 0 && var25 % var1.H() == 0) {
            String var29 = "";
            Color var30 = var10.g();
            if (!var13) {
               var29 = a(var1, var1.l.get(var25));
               var30 = zpw.a(var1.l.get(var25), var10.b(), var30);
            } else {
               String var31 = "";
               boolean var32 = false;
               var31 = ((zfp)var11.get(0)).c();
               var32 = ((zfp)var11.get(0)).b();
               var29 = zpw.a(var6.al(), var1.l.get(var25), var31, var32);
               var30 = zpw.a(var1.l.get(var25), var31, var30);
            }

            float var39 = var1.h;
            com.aspose.cells.b.a.b.zs var40 = zbsq.a(var0, var29, var10.d(), var10.a(), (com.aspose.cells.b.a.b.zt)var24, 1, 1);
            if ((float)var40.c() < var1.h) {
               var39 = (float)var40.c();
            }

            com.aspose.cells.b.a.b.zq var33 = new com.aspose.cells.b.a.b.zq(var21 - var1.f / 2.0F, var7, var1.f, var39);
            if (var10.d() != 0 && var10.d() != 90 && var10.d() != -90) {
               a(var0, var29, new com.aspose.cells.b.a.b.zo(var22, var9), new com.aspose.cells.b.a.b.zt(var1.f, var39), var10.d(), var10.a(), var30, var1.a());
            } else {
               a(var1, var29, var33);
               b(var0, com.aspose.cells.b.a.b.zp.a(var33), var29, var10.d(), var10.a(), var30, 1, 1);
            }
         }

         if (var25 % var1.Q() == 0 && var23 >= (float)var4.c() && var23 <= (float)(var4.c() + var4.e())) {
            a(var0, var1, var2, var23, var3, var4);
         }
      }

      float var34;
      if (var1.p()) {
         var34 = (float)(var4.c() + var4.e());
      } else {
         var34 = (float)var4.c();
      }

      var27 = var16;
      int var36 = a(var1.j(), var1.y(), (int)var1.x(), var16, var1.e().X());

      do {
         boolean var35 = true;
         int var37 = a(var1.j(), var1.C(), (int)var1.B(), var27, var1.e().X());
         if (var37 == var36) {
            var35 = false;
            var36 = a(var1.j(), var1.y(), (int)var1.x(), var36, var1.e().X());
         }

         if (var37 >= var36) {
            var36 = a(var1.j(), var1.y(), (int)var1.x(), var36, var1.e().X());
         }

         float var38 = (float)(var18 * (double)a(var17, var37, var27, var1.e().X()));
         if (var1.p()) {
            var34 -= var38;
         } else {
            var34 += var38;
         }

         if (var35 && var34 >= (float)var4.c() && var34 <= (float)(var4.c() + var4.e())) {
            b(var0, var1, var2, var34, var3, var4);
         }

         var27 = var37;
      } while(var34 >= (float)var4.c() && var34 <= (float)(var4.c() + var4.e()));

   }

   static void b(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcq var5) throws Exception {
      if (!zbuk.a(var4)) {
         int var6 = var5.ah();
         zig var7 = var1.e();
         zbtk var8 = var1.J();
         zje var9 = var5.E().b(0);
         String var10 = var9.z();
         boolean var11 = var9.A();
         boolean var12 = false;
         if (var8.h() && var9 != null) {
            var12 = true;
         }

         var1.l().a((float)var4.c(), var3, (float)var4.i(), var3);
         zrn var13 = var1.T();
         float var14 = 0.0F;
         float var15 = (float)(2 * var1.aa());
         float var16 = var1.f / 2.0F;
         float var10001;
         if (var1.m == 1) {
            var14 = (float)var4.j();
            var14 += var15;
            var10001 = var14 + var1.g;
            var13.b().b.b((int)var10001);
         } else if (var1.m == 2) {
            var14 = (float)var4.d() - var1.g;
            var13.b().b.b((int)var14 - var13.b().m());
         } else if (var1.m == 3) {
            if (var2) {
               var14 = var3 - var1.g;
               var13.b().b.b((int)var14 - var13.b().m());
            } else {
               var14 = var3 + var15;
               var10001 = var14 + var1.g;
               var13.b().b.b((int)var10001);
            }
         }

         var13.b().b.a(var4.i() - var13.b().b.e());
         int var17;
         double var18;
         int var20;
         String var21;
         Color var22;
         com.aspose.cells.b.a.b.zq var23;
         float var24;
         if (!var1.p()) {
            for(var17 = 0; var17 < var1.l.size(); ++var17) {
               var18 = (Double)var1.l.get(var17);
               if (var17 - 1 > 0) {
                  var20 = zbuk.a(var18, (Double)var1.l.get(var17 - 1));
                  if (Math.abs(zbuk.a(var18, (Double)var1.l.get(var17 - 1))) != zbuk.a(var1.x(), var20)) {
                     continue;
                  }
               } else if (var17 + 1 < var1.l.size()) {
                  var20 = zbuk.a(var18, (Double)var1.l.get(var17 + 1));
                  if (Math.abs(zbuk.a(var18, (Double)var1.l.get(var17 + 1))) != zbuk.a(var1.x(), var20)) {
                     continue;
                  }
               }

               var24 = (float)((double)var4.c() + (var18 - var1.D()) / (var1.z() - var1.D()) * (double)var4.e());
               if (var1.m != 0) {
                  if (zia.b(var6)) {
                     var18 /= 100.0D;
                     var10 = "0%";
                  }

                  var21 = "";
                  var22 = var8.g();
                  var18 *= Math.pow(10.0D, var1.T().f());
                  if (var12) {
                     var21 = zpw.a(var7.al(), var18, var10, var11);
                     var22 = zpw.a(var18, var10, var22);
                  } else {
                     var21 = a((zbp)var1, (Object)var18);
                     var22 = zpw.a(var18, var8.b(), var22);
                  }

                  var23 = new com.aspose.cells.b.a.b.zq(var24 - var16, var14, var1.f, var1.g - var15);
                  a(var1, var21, var23);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var23), var21, var8.d(), var8.a(), var22, 1, 1);
               }

               a(var0, var1, var2, var24, var3, var4);
            }
         } else {
            for(var17 = var1.l.size() - 1; var17 >= 0; --var17) {
               var18 = (Double)var1.l.get(var17);
               if (var17 - 1 > 0) {
                  var20 = zbuk.a(var18, (Double)var1.l.get(var17 - 1));
                  if (Math.abs(zbuk.a(var18, (Double)var1.l.get(var17 - 1))) != zbuk.a(var1.x(), var20)) {
                     continue;
                  }
               } else if (var17 + 1 < var1.l.size()) {
                  var20 = zbuk.a(var18, (Double)var1.l.get(var17 + 1));
                  if (Math.abs(zbuk.a(var18, (Double)var1.l.get(var17 + 1))) != zbuk.a(var1.x(), var20)) {
                     continue;
                  }
               }

               var24 = (float)((double)var4.c() + (var1.z() - var18) / (var1.z() - var1.D()) * (double)var4.e());
               if (var1.m != 0) {
                  if (zia.b(var6)) {
                     var18 /= 100.0D;
                     var10 = "0%";
                  }

                  var21 = "";
                  var22 = var8.g();
                  var18 *= Math.pow(10.0D, var1.T().f());
                  if (var12) {
                     var21 = zpw.a(var7.al(), var18, var10, var11);
                     var22 = zpw.a(var18, var10, var22);
                  } else {
                     var21 = a((zbp)var1, (Object)var18);
                     var22 = zpw.a(var18, var8.b(), var22);
                  }

                  var23 = new com.aspose.cells.b.a.b.zq(var24 - var16, var14, var1.f, var1.g - var15);
                  a(var1, var21, var23);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var23), var21, var8.d(), var8.a(), var22, 1, 1);
               }

               a(var0, var1, var2, var24, var3, var4);
            }
         }

         a(var0, var1, var2, var3, (float)var4.c(), (float)var4.i(), var4);
         var13.m();
      }
   }

   private static void a(zn var0, zbp var1, boolean var2, float var3, float var4, float var5, com.aspose.cells.b.a.b.zp var6) {
      if (var1.F() != 2) {
         zbp var7 = a(var1);
         boolean var8 = false;
         boolean var9 = false;
         switch(var1.F()) {
         case 0:
            var8 = true;
            var9 = true;
            break;
         case 1:
            var8 = true;
            if (var2) {
               var8 = false;
               var9 = true;
            }

            if (var7.o) {
               if (var2) {
                  var8 = true;
                  var9 = false;
               } else {
                  var8 = false;
                  var9 = true;
               }
            }
         case 2:
         default:
            break;
         case 3:
            var9 = true;
            if (var2) {
               var9 = false;
               var8 = true;
            }

            if (var7.o) {
               if (!var2) {
                  var8 = true;
                  var9 = false;
               } else {
                  var8 = false;
                  var9 = true;
               }
            }
         }

         float var11 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var5 - var4));
         float var10;
         if (var1.p()) {
            var10 = var5;
            var11 = -var11;
         } else {
            var10 = var4;
         }

         float var12 = var10;

         do {
            if (var8) {
               var1.l().a(var12, var3, var12, var3 - (float)var1.ab());
            }

            if (var9) {
               var1.l().a(var12, var3, var12, var3 + (float)var1.ab());
            }

            var12 += var11;
         } while(var4 <= var12 && var12 <= var5);

      }
   }

   static void a(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, int var5) throws Exception {
      if (!zbuk.a(var4)) {
         if (var1.k() == 2) {
            b(var0, var1, var2, var3, var4);
         } else {
            var1.l().a(var3, (float)var4.d(), var3, (float)var4.j());
            zig var6 = var1.e();
            float var7 = 0.0F;
            float var8 = 0.0F;
            float var9 = (float)(var1.aa() + var1.ab() + var1.J().k());
            float var10 = var1.g / 2.0F;
            byte var11 = 8;
            float var12 = 0.0F;
            if (var1.J().d() == 0) {
               var12 = var1.g;
            } else if (Math.abs(var1.J().d()) == 90) {
               var12 = var1.f;
            }

            if (var12 > (float)var1.J().a().d() * 1.5F) {
               var11 = 1;
            }

            if (var1.m == 1) {
               var7 = (float)var4.c() - var1.i - var9;
               var8 = (float)var4.c() - var9;
            } else if (var1.m == 2) {
               var7 = (float)var4.i() + var9;
               var8 = (float)var4.i() + var9;
               var11 = 7;
            } else if (var1.m == 3) {
               if (var2) {
                  var7 = var3 + var9;
                  var8 = var3 + var9;
                  var11 = 7;
               } else {
                  var7 = var3 - var9 - var1.i;
                  var8 = var3 - var9;
               }
            }

            boolean var13 = false;
            int var30;
            if (!var1.f() && !var6.u()) {
               var30 = var5 - 1;
               if (var30 == 0) {
                  var30 = 1;
               }
            } else {
               var30 = var5;
            }

            double var14 = (double)var4.f() / (double)var30;
            zbtk var16 = var1.J();
            ArrayList var17;
            ArrayList[] var18;
            if (var1.g() == 0) {
               var17 = var6.z().c();
               var18 = var6.z().e();
            } else {
               var17 = var6.z().d();
               var18 = var6.z().g();
            }

            boolean var19 = false;
            if (var16.h() && var17.size() > 0) {
               var19 = true;
            }

            float var22;
            float var23;
            for(int var20 = 0; var20 < var5; ++var20) {
               double var24 = (double)(var20 + 1) * var14;
               if (var1.f() || var1.e().u()) {
                  var24 += var14 / 2.0D;
               }

               float var21;
               if (var1.p()) {
                  var21 = (float)((double)var4.d() + (double)(var20 + 1) * var14);
                  var22 = (float)((double)var4.d() + var24 - var14);
                  var23 = (float)((double)var4.d() + var24 - var14);
               } else {
                  var21 = (float)((double)(var4.d() + var4.f()) - (double)(var20 + 1) * var14);
                  var22 = (float)((double)(var4.d() + var4.f()) - var24 + var14);
                  var23 = (float)((double)(var4.d() + var4.f()) - var24 + var14);
               }

               if (var1.m != 0 && var20 % var1.H() == 0 && var20 < var1.l.size()) {
                  String var26 = "";
                  Color var27 = var16.g();
                  if (!var19) {
                     var26 = a(var1, var1.l.get(var20));
                     var27 = zpw.a(var1.l.get(var20), var16.b(), var27);
                  } else {
                     String var28 = "";
                     boolean var29 = false;
                     var28 = var20 < var17.size() ? ((zfp)var17.get(var20)).c() : "";
                     var29 = var20 < var17.size() ? ((zfp)var17.get(var20)).b() : false;
                     var26 = zpw.a(var6.al(), var1.l.get(var20), var28, var29);
                     var27 = zpw.a(var1.l.get(var20), var28, var27);
                  }

                  com.aspose.cells.b.a.b.zq var34 = new com.aspose.cells.b.a.b.zq(var7, var22 - var10, var1.i, var1.h);
                  if (var16.d() != 0 && var16.d() != 90 && var16.d() != -90) {
                     a(var0, var26, new com.aspose.cells.b.a.b.zo(var8, var23), new com.aspose.cells.b.a.b.zt(var1.i, var1.h), var16.d(), var16.a(), var27, var1.a());
                  } else {
                     a(var1, var26, var34);
                     a(var0, com.aspose.cells.b.a.b.zp.a(var34), var26, var16.d(), var16.a(), var27, var11, 1);
                  }
               }

               float var33;
               if (var20 == 0) {
                  if (var1.p()) {
                     var33 = (float)var4.d();
                  } else {
                     var33 = (float)var4.j();
                  }

                  if (var33 >= (float)var4.d() && var33 <= (float)(var4.d() + var4.f())) {
                     a(var0, var1, var2, var3, var33);
                  }

                  float var35;
                  if (!var1.p()) {
                     var35 = var33 + (float)(var14 * (double)var1.Q() / 2.0D);
                  } else {
                     var35 = var33 - (float)(var14 * (double)var1.Q() / 2.0D);
                  }

                  if (var35 >= (float)var4.d() && var35 <= (float)(var4.d() + var4.f())) {
                     c(var0, var1, var2, var3, var35, var4);
                  }
               }

               if ((var20 + 1) % var1.Q() == 0) {
                  if (var21 >= (float)var4.d() && var21 <= (float)(var4.d() + var4.f())) {
                     a(var0, var1, var2, var3, var21);
                  }

                  if (!var1.p()) {
                     var33 = var21 + (float)(var14 * (double)var1.Q() / 2.0D);
                  } else {
                     var33 = var21 - (float)(var14 * (double)var1.Q() / 2.0D);
                  }

                  if (var33 >= (float)var4.d() && var33 <= (float)(var4.d() + var4.f())) {
                     c(var0, var1, var2, var3, var33, var4);
                  }
               }
            }

            if (var18 != null && var18.length > 0 && var17.size() > 0 && var1.m != 0) {
               float var31 = var9 * (float)(var18.length + 1);
               boolean var32 = false;
               var22 = (float)var4.c();
               if (var1.m == 1) {
                  var7 = (float)var4.c() - var1.f - var31;
                  var32 = true;
                  var22 = (float)var4.c();
               } else if (var1.m == 2) {
                  var7 = (float)var4.i() + var31 + var1.f;
                  var32 = false;
                  var22 = (float)var4.i();
               } else if (var1.m == 3) {
                  if (var2) {
                     var7 = var3 + var31 + var1.f;
                     var32 = false;
                  } else {
                     var7 = var3 - var31 - var1.f;
                     var32 = true;
                  }

                  var22 = var3;
               }

               if (!var1.p()) {
                  var23 = (float)var4.j();
               } else {
                  var23 = (float)var4.d();
               }

               a(var0, var18, var32, var1, var16, var14, var4, var9, var22, var7, var23);
            }

         }
      }
   }

   private static void a(zn var0, ArrayList[] var1, boolean var2, zbp var3, zbtk var4, double var5, com.aspose.cells.b.a.b.zp var7, float var8, float var9, float var10, float var11) {
      zig var12 = var3.e();
      float var13 = var11;

      for(int var14 = 0; var14 < var1.length; ++var14) {
         com.aspose.cells.b.a.b.zs var15 = new com.aspose.cells.b.a.b.zs(0, 0);
         ArrayList var16 = var1[var14];

         for(int var17 = 0; var17 < var16.size(); ++var17) {
            zfp var18 = (zfp)var16.get(var17);
            int var19 = a((zafr)var18);
            float var20 = (float)((double)var19 * var5);
            String var21 = zpw.a(var12.al(), var18.a(), var18.c(), var18.b());
            var15 = zbsq.a(var3.e().ap(), var21, 90, var4.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var7.b().b(), var20)), 1, 1);
            float var22 = var2 ? var10 : var10 - (float)var15.b();
            float var23;
            if (!var3.p()) {
               var23 = var11 - var20 / 2.0F - (float)(var15.c() / 2);
            } else {
               var23 = var11 + var20 / 2.0F - (float)(var15.c() / 2);
            }

            com.aspose.cells.b.a.b.zq var24 = new com.aspose.cells.b.a.b.zq(var22, var23, (float)var15.b(), (float)var15.c());
            a(var0, com.aspose.cells.b.a.b.zp.a(var24), var21, 90, var4.a(), var4.g(), 1, 9);
            var3.l().a(var9, var11, var10, var11);
            if (var3.E() != 2) {
               float var25 = var2 ? var10 + var8 + (float)var15.b() : var10 - (var8 + (float)var15.b());
               a(var0, var18.d(), var9, var25, var11, var3, var5);
            }

            if (!var3.p()) {
               var11 -= var20;
            } else {
               var11 += var20;
            }
         }

         var3.l().a(var9, var11, var10, var11);
         var11 = var13;
         var10 = var2 ? var10 + (float)var15.b() + var8 : var10 - (float)var15.b() - var8;
      }

   }

   private static void a(zn var0, zafs var1, float var2, float var3, float var4, zbp var5, double var6) {
      float var8 = var4;

      for(int var9 = 0; var9 < var1.getCount(); ++var9) {
         zfp var10 = (zfp)var1.a(var9);
         int var11 = a((zafr)var10);
         float var12 = (float)((double)var11 * var6);
         if (!var5.p()) {
            var8 -= var12;
         } else {
            var8 += var12;
         }

         var5.l().a(var2, var8, var3, var8);
      }

   }

   private static void c(zn var0, zbp var1, boolean var2, float var3, float var4, com.aspose.cells.b.a.b.zp var5) {
      zbp var6 = a(var1);
      boolean var7 = false;
      boolean var8 = false;
      switch(var1.F()) {
      case 0:
         var7 = true;
         var8 = true;
         break;
      case 1:
         var7 = true;
         if (var2) {
            var7 = false;
            var8 = true;
         }

         if (var6.o) {
            if (var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      case 2:
      default:
         break;
      case 3:
         var8 = true;
         if (var2) {
            var8 = false;
            var7 = true;
         }

         if (var6.o) {
            if (!var2) {
               var7 = true;
               var8 = false;
            } else {
               var7 = false;
               var8 = true;
            }
         }
      }

      if (var7) {
         var1.l().a(var3, var4, var3 + (float)var1.ab(), var4);
      }

      if (var8) {
         var1.l().a(var3 - (float)var1.ab(), var4, var3, var4);
      }

   }

   private static void b(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4) {
      ArrayList var5 = var1.l;
      zig var6 = var1.e();
      var1.l().a(var3, (float)var4.d(), var3, (float)var4.j());
      float var7 = 0.0F;
      float var8 = (float)var1.J().k();
      byte var9 = 8;
      if (var1.m == 1) {
         var7 = (float)var4.c() - var1.f - var8;
      } else if (var1.m == 2) {
         var7 = (float)var4.i() + var8;
         var9 = 7;
      } else if (var1.m == 3) {
         if (var2) {
            var7 = var3 + var8;
            var9 = 7;
         } else {
            var7 = var3 - var8 - var1.f;
         }
      }

      zbtk var10 = var1.J();
      ArrayList var11;
      ArrayList[] var12;
      if (var1.g() == 0) {
         var11 = var6.z().c();
         var12 = var6.z().e();
      } else {
         var11 = var6.z().d();
         var12 = var6.z().g();
      }

      boolean var13 = false;
      if (var10.h() && var11.size() > 0) {
         var13 = true;
      }

      if (var12 != null && var12.length > 0 && var11.size() > 0) {
         var13 = true;
      }

      boolean var14 = false;
      int var15 = (int)var1.z();
      int var16 = (int)var1.D();
      int var17 = var1.j();
      int var31;
      if (!var6.e().f() && !var6.u()) {
         var31 = a(var17, var15, var16, var1.e().X());
         if (var31 == 0) {
            var31 = 1;
         }
      } else {
         var31 = a(var17, var15, var16, var1.e().X()) + 1;
      }

      double var18 = (double)var4.f() / (double)var31;
      float var20 = 0.0F;
      float var21 = 0.0F;
      float var22 = 0.0F;
      if (var1.p()) {
         var22 = (float)var4.d();
      } else {
         var22 = (float)(var4.d() + var4.f());
      }

      int var25;
      for(int var23 = 0; var23 < var5.size(); ++var23) {
         int var24 = com.aspose.cells.b.a.ze.f(var1.l.get(var23));
         var25 = a(var17, var24, var16, var1.e().X());
         float var26 = (float)(var18 * (double)var25);
         var20 = (float)(var18 * (double)a(var17, a(var1.j(), var1.y(), (int)var1.x(), var24, var1.e().X()), var24, var1.e().X()));
         if (var1.f() || var6.u()) {
            var26 += (float)(var18 / 2.0D);
         }

         if (var1.p()) {
            var22 += var20;
            var21 = (float)var4.d() + var26;
         } else {
            var22 -= var20;
            var21 = (float)(var4.d() + var4.f()) - var26;
         }

         var21 -= var1.g / 2.0F;
         if (var1.m != 0 && var23 % var1.H() == 0) {
            String var27 = "";
            Color var28 = var10.g();
            if (!var13) {
               var27 = a(var1, var1.l.get(var23));
               var28 = zpw.a(var1.l.get(var23), var10.b(), var28);
            } else {
               String var29 = "";
               boolean var30 = false;
               var29 = ((zfp)var11.get(0)).c();
               var30 = ((zfp)var11.get(0)).b();
               var27 = zpw.a(var6.al(), var1.l.get(var23), var29, var30);
               var28 = zpw.a(var1.l.get(var23), var29, var28);
            }

            com.aspose.cells.b.a.b.zq var37 = new com.aspose.cells.b.a.b.zq(var7, var21, var1.f, var1.g);
            a(var1, var27, var37);
            a(var0, com.aspose.cells.b.a.b.zp.a(var37), var27, var10.d(), var10.a(), var28, var9, 1);
         }

         if (var23 % var1.Q() == 0 && var22 >= (float)var4.d() && var22 <= (float)(var4.d() + var4.f())) {
            a(var0, var1, var2, var3, var22);
         }
      }

      float var32;
      if (var1.p()) {
         var32 = (float)var4.d();
      } else {
         var32 = (float)(var4.d() + var4.f());
      }

      var25 = var16;
      int var34 = a(var1.j(), var1.y(), (int)var1.x(), var16, var1.e().X());

      do {
         boolean var33 = true;
         int var35 = a(var1.j(), var1.C(), (int)var1.B(), var25, var1.e().X());
         if (var35 == var34) {
            var33 = false;
            var34 = a(var1.j(), var1.y(), (int)var1.x(), var34, var1.e().X());
         }

         if (var35 >= var34) {
            var34 = a(var1.j(), var1.y(), (int)var1.x(), var34, var1.e().X());
         }

         float var36 = (float)(var18 * (double)a(var17, var35, var25, var1.e().X()));
         if (var1.p()) {
            var32 += var36;
         } else {
            var32 -= var36;
         }

         if (var33 && var32 >= (float)var4.d() && var32 <= (float)(var4.d() + var4.f())) {
            c(var0, var1, var2, var3, var32, var4);
         }

         var25 = var35;
      } while(var32 >= (float)var4.d() && var32 <= (float)(var4.d() + var4.f()));

   }

   static void c(zn var0, zbp var1, boolean var2, float var3, com.aspose.cells.b.a.b.zp var4, zbcq var5) throws Exception {
      if (!zbuk.a(var4)) {
         if (var1.w != null) {
            if (var1.m == 1) {
               var3 += (float)(var1.w.v.c() + var1.aa());
            } else if (var1.m == 2) {
               var3 -= (float)(var1.w.v.c() + var1.aa());
            }
         }

         var1.l().a((float)var4.c(), var3, (float)var4.i(), var3);
         zig var6 = var1.e();
         zrn var7 = var1.T();
         float var8 = 0.0F;
         float var9 = (float)var1.J().k();
         if (var1.w != null) {
            var9 += (float)(var1.w.v.c() + var1.aa());
         }

         float var10001;
         if (var1.m == 1) {
            var8 = (float)var4.j() + var9;
            var10001 = var8 + var1.g;
            var7.b().b.b((int)var10001);
         } else if (var1.m == 2) {
            var8 = (float)var4.d() - var9 - var1.g;
            var7.b().b.b((int)var8 - var7.b().b.f());
         } else if (var1.m == 3) {
            if (var2) {
               var8 = var3 - var9 - var1.g;
               var7.b().b.b((int)var8 - var7.b().b.f());
            } else {
               var8 = var3 + var9;
               var10001 = var8 + var1.g;
               var7.b().b.b((int)var10001);
            }
         }

         var7.b().b.a(var4.i() - var7.b().b.e());
         zbtk var10 = var1.J();
         zje var11 = var5.E().b(0);
         String var12 = var11.t();
         boolean var13 = var11.u();
         boolean var14 = false;
         if (var10.h() && var11 != null) {
            var14 = true;
         }

         ArrayList var15 = var1.l;
         double var16 = var1.n() ? var1.g(var1.z()) : var1.z();
         double var18 = var1.n() ? var1.g(var1.D()) : var1.D();
         double var20 = var1.n() ? var1.g(var1.x()) : var1.x();
         int var22;
         double var23;
         double var25;
         float var27;
         String var28;
         Color var29;
         com.aspose.cells.b.a.b.zq var30;
         if (!var1.p()) {
            for(var22 = 0; var22 < var15.size(); ++var22) {
               var23 = com.aspose.cells.b.a.ze.g(var15.get(var22));
               var25 = var1.n() ? var1.h(var23) : var23;
               if (var22 - 1 > 0) {
                  if (Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var15.get(var22 - 1)))) < var20 * a) {
                     continue;
                  }
               } else if (var22 + 1 < var15.size() && Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var15.get(var22 + 1)))) < var20 * a) {
                  continue;
               }

               var27 = (float)((double)var4.c() + (var23 - var18) / (var16 - var18) * (double)var4.e());
               if (var1.m != 0) {
                  var28 = "";
                  var29 = var10.g();
                  var25 = var1.n() ? var25 : var25 * Math.pow(10.0D, var1.T().f());
                  if (var14) {
                     var28 = zpw.a(var6.al(), var25, var12, var13);
                     var29 = zpw.a(var25, var12, var29);
                  } else {
                     var28 = a((zbp)var1, (Object)var25);
                     var29 = zpw.a(var25, var10.b(), var29);
                  }

                  var30 = new com.aspose.cells.b.a.b.zq(var27 - var1.f / 2.0F, var8, var1.f, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var30), var28, var10.d(), var10.a(), var29, 1, 1);
               }

               a(var0, var1, var2, var27, var3, var4);
            }
         } else {
            for(var22 = var15.size() - 1; var22 >= 0; --var22) {
               var23 = com.aspose.cells.b.a.ze.g(var15.get(var22));
               var25 = var1.n() ? var1.h(var23) : var23;
               if (var22 - 1 > 0) {
                  if (Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var15.get(var22 - 1)))) != var20) {
                     continue;
                  }
               } else if (var22 + 1 < var15.size() && Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var15.get(var22 + 1)))) != var20) {
                  continue;
               }

               var27 = (float)((double)var4.c() + (var16 - var23) / (var16 - var18) * (double)var4.e());
               if (var1.m != 0) {
                  var28 = "";
                  var29 = var10.g();
                  var25 = var1.n() ? var25 : var25 * Math.pow(10.0D, var1.T().f());
                  if (var14) {
                     var28 = zpw.a(var6.al(), var25, var12, var13);
                     var29 = zpw.a(var25, var12, var29);
                  } else {
                     var28 = a((zbp)var1, (Object)var25);
                     var29 = zpw.a(var25, var10.b(), var29);
                  }

                  var30 = new com.aspose.cells.b.a.b.zq(var27 - var1.f / 2.0F, var8, var1.f, var1.g);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var30), var28, var10.d(), var10.a(), var29, 1, 1);
               }

               a(var0, var1, var2, var27, var3, var4);
            }
         }

         a(var0, var1, var2, var3, (float)var4.c(), (float)var4.i(), var4);
         var7.m();
      }
   }

   static void a(zn var0, zbcs var1, zbp var2, com.aspose.cells.b.a.b.zp var3) {
      if (!zbuk.a(var3)) {
         if (var2.q()) {
            boolean var4 = var2.I() != 3;
            if (var4) {
               zig var5 = var2.e();
               zbtk var6 = var2.J();
               zbcq var7 = var1.c(0);
               ArrayList var8;
               ArrayList[] var9;
               if (var2.g() == 0) {
                  var8 = var5.z().c();
                  var9 = var5.z().e();
               } else {
                  var8 = var5.z().d();
                  var9 = var5.z().g();
               }

               float var10 = (float)var2.J().k();
               int var11 = zia.a(var1.i());
               double var12 = 6.283185307179586D / (double)var11;
               double var14 = (double)var3.c() + (double)var3.e() / 2.0D;
               double var16 = (double)var3.d() + (double)var3.f() / 2.0D;
               new com.aspose.cells.b.a.b.zo((float)var14, (float)var16);
               double var19 = 1.5707963267948966D + var12;
               double var21 = (double)(var3.e() / 2);

               for(int var23 = 0; var23 < var11; ++var23) {
                  var19 -= var12;
                  String var24 = "";
                  Color var25 = var6.g();
                  com.aspose.cells.b.a.b.zt var26 = new com.aspose.cells.b.a.b.zt(var2.f, var2.g);
                  if (var6.h() && var8.size() > 0) {
                     String var27 = "";
                     boolean var28 = false;
                     var27 = var23 < var8.size() ? ((zfp)var8.get(var23)).c() : "";
                     var28 = var23 < var8.size() ? ((zfp)var8.get(var23)).b() : false;
                     var24 = zpw.a(var5.al(), var2.l.get(var23), var27, var28);
                     var25 = zpw.a(var2.l.get(var23), var27, var25);
                  } else {
                     var24 = a(var2, var2.l.get(var23));
                     var25 = zpw.a(var2.l.get(var23), var6.b(), var25);
                  }

                  com.aspose.cells.b.a.b.zg var37 = var6.a();
                  int var38 = var6.d();
                  com.aspose.cells.b.a.b.zs var29 = zbsq.a(var2.e().ap(), var24, var38, var37, (com.aspose.cells.b.a.b.zt)var26, 1, 1);
                  double var30 = (var21 + (double)var10) * Math.cos(var19);
                  double var32 = (var21 + (double)var10) * Math.sin(var19);
                  double var34 = var19 / 3.141592653589793D * 180.0D;
                  if (var34 >= -135.0D && var34 <= -45.0D) {
                     var30 = (double)((float)(var30 + (var34 - -45.0D) * (double)var29.b() / 90.0D));
                  } else if (var34 <= -225.0D && var34 >= -270.0D) {
                     var30 = (double)((float)(var30 - (var34 - -315.0D) * (double)var29.b() / 90.0D));
                  } else if (var34 <= 90.0D && var34 >= 45.0D) {
                     var30 = (double)((float)(var30 - (var34 - 45.0D) * (double)var29.b() / 90.0D));
                  } else if (var34 <= -135.0D && var34 >= -225.0D) {
                     var30 -= (double)var29.b();
                  }

                  if (var34 >= -225.0D && var34 <= -135.0D) {
                     var32 = (double)((float)(var32 - (var34 - -135.0D) * (double)var29.c() / 90.0D));
                  } else if (var34 >= -45.0D && var34 <= 45.0D) {
                     var32 = (double)((float)(var32 + (var34 + 45.0D) * (double)var29.c() / 90.0D));
                  } else if (var34 <= -225.0D && var34 >= -270.0D || var34 <= 90.0D && var34 >= 45.0D) {
                     var32 += (double)var29.c();
                  }

                  var30 += var14;
                  var32 = var16 - var32;
                  com.aspose.cells.b.a.b.zp var36 = new com.aspose.cells.b.a.b.zp((int)var30, (int)var32, var29.b(), var29.c());
                  a(var0, var36, var24, var38, var37, var25, 1, 1);
               }

            }
         }
      }
   }

   static void b(zn var0, zbcs var1, zbp var2, com.aspose.cells.b.a.b.zp var3) throws Exception {
      if (!zbuk.a(var3)) {
         if (var2.q()) {
            zbcq var4 = var1.c(0);
            zig var5 = var2.e();
            zbtk var6 = var2.J();
            zje var7 = var4.E().b(0);
            boolean var8 = false;
            if (var6.h() && var7 != null) {
               var8 = true;
            }

            int var9 = zia.a(var1.i());
            double var10 = 6.283185307179586D / (double)var9;
            double var12 = (double)var3.c() + (double)var3.e() / 2.0D;
            double var14 = (double)var3.d() + (double)var3.f() / 2.0D;
            com.aspose.cells.b.a.b.zo var16 = new com.aspose.cells.b.a.b.zo((float)var12, (float)var14);
            double var17 = 1.5707963267948966D + var10;
            double var19 = (double)(var3.e() / 2);

            for(int var21 = 0; var21 < var9; ++var21) {
               var17 -= var10;
               double var22 = var17 / 3.141592653589793D * 180.0D;
               double var24 = var12 + var19 * Math.cos(var17);
               double var26 = var14 - var19 * Math.sin(var17);
               com.aspose.cells.b.a.b.zo var28 = new com.aspose.cells.b.a.b.zo((float)var24, (float)var26);
               var2.l().a(var28, var16);
            }

            double var53 = 0.0D;
            Collections.sort(var2.l);
            double var23 = var2.V();
            double var25 = var2.W();
            double var27 = var2.Y();
            double var29 = var2.Z();
            ArrayList var31 = var2.l;
            double var33;
            double var35;
            double var39;
            double var41;
            if (var2.q() && var2.I() != 3) {
               for(int var32 = 0; var32 < var2.l.size(); ++var32) {
                  var33 = com.aspose.cells.b.a.ze.g(var31.get(var32));
                  var35 = var2.n() ? var2.h(var33) : var33;
                  if (var32 - 1 > 0) {
                     if (Math.abs(zbuk.a(var33, com.aspose.cells.b.a.ze.g(var31.get(var32 - 1)))) != var27) {
                        continue;
                     }
                  } else if (var32 + 1 < var31.size() && Math.abs(zbuk.a(var33, com.aspose.cells.b.a.ze.g(var31.get(var32 + 1)))) != var27) {
                     continue;
                  }

                  var53 = Math.abs(var33 - var25);
                  double var37 = var19 * var53 / (var23 - var25);
                  var39 = var12 + var37 * Math.cos(1.5707963267948966D);
                  var41 = var14 - var37 * Math.sin(1.5707963267948966D);
                  var35 = var2.n() ? var35 : var35 * Math.pow(10.0D, var2.T().f());
                  String var43 = a((zbp)var2, (Object)var35);
                  Color var44 = var2.J().g();
                  var44 = zpw.a(var35, var2.J().b(), var44);
                  if (var8) {
                     var43 = zpw.a(var5.al(), var35, var7.z(), var7.A());
                     var44 = zpw.a(var35, var7.z(), var44);
                  }

                  com.aspose.cells.b.a.b.zg var45 = var2.J().a();
                  int var46 = var2.J().d();
                  com.aspose.cells.b.a.b.zs var47 = zbsq.b(var2.e().ap(), var43, var46, var45, (com.aspose.cells.b.a.b.zs)var3.b(), 1, 1);
                  var47.a(var47.b() + var2.ac() * 2);
                  var39 = var39 - (double)var47.b() - (double)var2.e().a() * 0.011D;
                  var41 -= (double)(var47.c() / 2);
                  com.aspose.cells.b.a.b.zp var48 = new com.aspose.cells.b.a.b.zp((int)var39, (int)var41, var47.b(), var47.c());
                  a(var0, var48, var43, var46, var45, var44, 1, 1, com.aspose.cells.b.a.b.zv.c());
                  var17 = 1.5707963267948966D;
               }
            }

            zbp var54 = var2;
            int var38;
            double var50;
            com.aspose.cells.b.a.b.zo var52;
            com.aspose.cells.b.a.b.zo var55;
            double var56;
            double var57;
            com.aspose.cells.b.a.b.zo var58;
            double var59;
            if (var2.e().a && var2 == var2.e().G()) {
               var53 = 0.0D;
               var23 = var2.n() ? var2.g(var2.b) : var2.b;
               var25 = var2.n() ? var2.g(var2.c) : var2.c;
               var27 = var2.n() ? var2.g(var2.d) : var2.d;
               var29 = var2.n() ? var2.g(var2.e) : var2.e;
               if (var27 > 0.0D) {
                  for(var33 = var25 + var27; var33 <= var23; var33 = zbuk.b(var33, var27)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.w().g() && var54.E() != 2 && !var54.A().g() && var54.q()) {
                           var39 = Math.atan((double)var54.aa() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.aa(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           var54.l().a(var58, var52);
                        }

                        var17 -= var10;
                     }
                  }
               }

               if (var29 > 0.0D) {
                  for(var33 = var25 + var29; var33 <= var23; var33 = zbuk.b(var33, var29)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.A().g() && var54.F() != 2 && var54.q()) {
                           var39 = Math.atan((double)var54.ab() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.ab(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           var54.l().a(var58, var52);
                        }

                        var17 -= var10;
                     }
                  }
               }
            } else {
               var53 = 0.0D;
               var23 = var2.V();
               var25 = var2.W();
               var27 = var2.Y();
               var29 = var2.Z();
               if (var27 > 0.0D) {
                  for(var33 = var25 + var27; var33 <= var23; var33 = zbuk.b(var33, var27)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.w().g() && var54.E() != 2 && !var54.A().g() && var54.q()) {
                           var39 = Math.atan((double)var54.aa() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.aa(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           var54.l().a(var58, var52);
                        }

                        var17 -= var10;
                     }
                  }
               }

               if (var29 > 0.0D) {
                  for(var33 = var25 + var29; var33 <= var23; var33 = zbuk.b(var33, var29)) {
                     var53 = Math.abs(var33 - var25);
                     var35 = var19 * var53 / (var23 - var25);
                     var17 = 1.5707963267948966D;
                     var55 = com.aspose.cells.b.a.b.zo.a();

                     for(var38 = 0; var38 < var9; ++var38) {
                        if (!var54.A().g() && var54.F() != 2 && var54.q()) {
                           var39 = Math.atan((double)var54.ab() / var35);
                           var41 = Math.sqrt(Math.pow(var35, 2.0D) + Math.pow((double)var54.ab(), 2.0D));
                           var56 = var12 + var41 * Math.cos(var17 + var39);
                           var57 = var14 - var41 * Math.sin(var17 + var39);
                           var58 = new com.aspose.cells.b.a.b.zo((float)var56, (float)var57);
                           var59 = var12 + var41 * Math.cos(var17 - var39);
                           var50 = var14 - var41 * Math.sin(var17 - var39);
                           var52 = new com.aspose.cells.b.a.b.zo((float)var59, (float)var50);
                           var54.l().a(var58, var52);
                        }

                        var17 -= var10;
                     }
                  }
               }
            }

         }
      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, zbp var1, zbcq var2, boolean var3) throws Exception {
      if (var1.q() && var1.I() != 3 && !var1.e().B().E()) {
         zig var4 = var1.e();
         zje var5 = var2.E().b(0);
         int var6 = var2.ah();
         zbtk var7 = var1.J();
         String var8 = var5.z();
         boolean var9 = var5.A();
         boolean var10 = false;
         if (var7.h() && var5 != null) {
            var10 = true;
         }

         int var11 = 0;
         int var12 = 0;
         ArrayList var13 = var1.l;
         if (var1.n()) {
            var1.g(var1.z());
         } else {
            var1.z();
         }

         if (var1.n()) {
            var1.g(var1.D());
         } else {
            var1.D();
         }

         double var18 = var1.n() ? var1.g(var1.x()) : var1.x();
         double var20 = 1.0E-10D;

         for(int var22 = 0; var22 < var1.l.size(); ++var22) {
            double var23 = com.aspose.cells.b.a.ze.g(var13.get(var22));
            double var25 = var1.n() ? var1.h(var23) : var23;
            if (var22 - 1 > 0) {
               if (Math.abs(zbuk.a(var18, Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var13.get(var22 - 1)))))) / var18 > 1.0E10D) {
                  continue;
               }
            } else if (var22 + 1 < var13.size() && Math.abs(zbuk.a(var18, Math.abs(zbuk.a(var23, com.aspose.cells.b.a.ze.g(var13.get(var22 + 1)))))) / var20 > 1.0E10D) {
               continue;
            }

            if (zia.b(var6)) {
               var25 /= 100.0D;
               var8 = "0%";
            }

            String var27 = "";
            var25 = var1.n() ? var25 : var25 * Math.pow(10.0D, var1.T().f());
            Color var28 = var7.g();
            if (var10) {
               var27 = zpw.a(var4.al(), var25, var8, var9);
               zpw.a(var25, var8, var28);
            } else {
               var27 = a((zbp)var1, (Object)var25);
               var28 = zpw.a(var25, var7.b(), var28);
            }

            com.aspose.cells.b.a.b.zs var29 = zbsq.b(var1.e().ap(), var27, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zs)var1.e().B().b.b(), 1, 1);
            var29.a(var29.b() + var1.ac() * 2);
            if (var29.b() > var11) {
               var11 = var29.b();
            }

            if (var29.c() > var12) {
               var12 = var29.c();
            }
         }

         if (var3) {
            var12 += (int)((double)(2 * var1.aa()) + 0.5D);
         } else {
            var11 += (int)((double)(2 * var1.aa()) + 0.5D);
         }

         var1.f = (float)var11;
         var1.g = (float)var12;
         return new com.aspose.cells.b.a.b.zs(var11, var12);
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, zbp var1, com.aspose.cells.b.a.b.zp var2, com.aspose.cells.b.a.b.zp var3, int var4, boolean var5, zbcq var6) throws Exception {
      if (var1.q() && var1.I() != 3 && !zbuk.a(var2)) {
         boolean var7 = false;
         if (var1.k() == 2) {
            var7 = true;
            var1.f(false);
            var1.k(1);
         }

         ArrayList var8 = (ArrayList)var1.l.clone();
         if (var1.n()) {
            for(int var9 = 0; var9 < var8.size(); ++var9) {
               var8.set(var9, var1.h(com.aspose.cells.b.a.ze.g(var8.get(var9))));
            }
         }

         zig var49 = var1.e();
         boolean var10 = var49.aa();
         boolean var13 = false;
         ArrayList var11;
         ArrayList[] var12;
         if (var1.g() == 0) {
            var11 = var49.z().c();
            var12 = var49.z().e();
            var13 = var49.z().b;
         } else {
            var11 = var49.z().d();
            var12 = var49.z().g();
            var13 = var49.z().c;
         }

         boolean var14 = var12 != null && var12.length > 0;
         int var15 = b(var1);
         zbtk var16 = var1.J();
         short var17 = 300;
         String var18 = var6.E().a(0).t();
         boolean var19 = var6.E().a(0).u();
         String var20 = "";
         boolean var21 = false;
         boolean var22 = false;
         if (var6.ah() != 60 && var6.ah() != 12) {
            if (var16.h() && var11.size() > 0) {
               var22 = true;
            }

            if (var12 != null && var12.length > 0 && var11.size() > 0) {
               var22 = true;
            }
         } else if (var16.h()) {
            var22 = true;
         }

         com.aspose.cells.b.a.b.zt var23 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         boolean var24 = false;
         int var50;
         if (!var7) {
            if (!var1.f() && !var49.u()) {
               var50 = var4 - 1;
               if (var50 == 0) {
                  var50 = 1;
               }
            } else {
               var50 = var4;
            }
         } else {
            var50 = var8.size();
         }

         int var25 = 1;
         if (!var6.av()) {
            float var26;
            if (var5) {
               if ((float)var2.f() / (float)var50 < 1.0F) {
                  var26 = (float)var2.f() / (float)var50 * 10.0F;
                  var25 *= 10;
                  if (var26 < 1.0F) {
                     var26 = (float)var2.e() / (float)var50 * 10.0F;
                     var25 *= 10;
                  }
               }
            } else if ((float)var2.e() / (float)var50 < 1.0F) {
               var26 = (float)var2.e() / (float)var50 * 10.0F;
               var25 *= 10;
               if (var26 < 1.0F) {
                  var26 = (float)var2.e() / (float)var50 * 10.0F;
                  var25 *= 10;
               }
            }
         }

         int var51 = 0;
         int var27 = 0;
         int var28 = 0;
         int var29 = 0;
         float var30;
         int var31;
         int var32;
         float var33;
         boolean var34;
         com.aspose.cells.b.a.b.zs var35;
         int var36;
         if (var16.j()) {
            var30 = 0.55F;
            var31 = 0;
            var32 = 0;
            var33 = 0.0F;
            var34 = false;
            var35 = zbsq.a(var0, "a", var16.a());
            var36 = 0;
            float[][] var37 = new float[var8.size()][2];
            com.aspose.cells.b.a.b.zs[] var38 = new com.aspose.cells.b.a.b.zs[var8.size()];
            String[] var39 = new String[var8.size()];

            int var44;
            label844:
            while(true) {
               while(true) {
                  while(true) {
                     var51 = 0;
                     var27 = 0;
                     var28 = 0;
                     var29 = 0;
                     float var40 = 0.0F;
                     if (var6.av()) {
                        com.aspose.cells.b.a.b.zt var41 = zbsq.c(var0, "3", var16.a());
                        if (var5) {
                           var23.b((float)var2.f() / (float)var8.size());
                           var23.a((float)var2.e() * var30);
                           var23.b(var23.c() + (float)zbuk.a((double)var41.c()));
                           var40 = var23.c();
                        } else {
                           var23.a((float)var2.e() / (float)var8.size());
                           var23.b((float)var2.f() * var30);
                           var23.a(var23.b() + (float)zbuk.a((double)var41.b()));
                           var40 = var23.b();
                        }
                     } else if (var5) {
                        var23.b((float)var2.f() / (float)var50 * (float)var1.H());
                        var23.a((float)var2.e() * var30);
                        if (var1.K()) {
                           if (Math.abs(var16.d()) == 0 && var1.H() < var50) {
                              if (var23.c() < (float)var35.c()) {
                                 var1.k(var1.H() + var25);
                                 continue;
                              }
                           } else if (Math.abs(var16.d()) == 90 && var23.c() < (float)var35.b() && var1.H() < var50) {
                              var1.k(var1.H() + var25);
                              continue;
                           }
                        }

                        var40 = var23.c();
                     } else {
                        if (var15 > var1.H()) {
                           var23.a((float)var2.e() / (float)var50 * (float)var15);
                        } else {
                           var23.a((float)var2.e() / (float)var50 * (float)var1.H());
                        }

                        var23.b((float)var2.f() * var30);
                        if (var1.K()) {
                           if (Math.abs(var16.d()) == 0) {
                              if (var23.b() < (float)var35.b()) {
                                 var1.k(var1.H() + var25);
                                 continue;
                              }
                           } else if (Math.abs(var16.d()) == 90 && (!var49.aa() && var23.b() < (float)(var35.c() - 2) || var49.aa() && var23.b() < (float)var35.c())) {
                              var1.k(var1.H() + var25);
                              if (!var14) {
                                 var16.b(45);
                              }
                              continue;
                           }
                        }

                        var40 = var23.b();
                     }

                     float var73 = 0.0F;
                     if (var16.d() == 45) {
                        if (var6.av()) {
                           if (var5) {
                              var73 = (float)(var2.f() / var8.size());
                           } else {
                              var73 = (float)(var2.e() / var8.size());
                           }
                        } else if (var5) {
                           var73 = (float)(var2.f() / var50);
                        } else {
                           var73 = (float)(var2.e() / var50);
                        }
                     }

                     float var42 = 0.0F;
                     float var43 = 0.0F;

                     for(var44 = 0; var44 < var8.size(); ++var44) {
                        if (var16.d() == 45) {
                           int var45 = var8.size() - 1 - var44;
                           if (var5) {
                              if (var1.p()) {
                                 if (var16.d() > 0) {
                                    var23.a((float)var2.e() * var30);
                                    var23.b((float)var2.f() - (float)var44 * var73 - var73 / 2.0F);
                                 } else {
                                    var23.a((float)var2.e() * var30);
                                    var23.b((float)var2.f() - (float)var45 * var73 - var73 / 2.0F);
                                 }
                              } else if (var16.d() > 0) {
                                 var23.a((float)var2.e() * var30);
                                 var23.b((float)var2.f() - (float)var45 * var73 - var73 / 2.0F);
                              } else {
                                 var23.a((float)var2.e() * var30);
                                 var23.b((float)var2.f() - (float)var44 * var73 - var73 / 2.0F);
                              }
                           } else if (var1.p()) {
                              if (var16.d() > 0) {
                                 var23.a((float)var2.e() - (float)var44 * var73 - var73 / 2.0F);
                                 var23.b((float)var2.f() * var30);
                              } else {
                                 var23.a((float)var2.e() - (float)var45 * var73 - var73 / 2.0F);
                                 var23.b((float)var2.f() * var30);
                              }
                           } else if (var16.d() > 0) {
                              var23.a((float)var2.e() - (float)var45 * var73 - var73 / 2.0F);
                              var23.b((float)var2.f() * var30);
                           } else {
                              var23.a((float)var2.e() - (float)var44 * var73 - var73 / 2.0F);
                              var23.b((float)var2.f() * var30);
                           }

                           if (var23.b() < (float)var2.e() * var30) {
                              var23.a((float)var2.e() * var30);
                           }

                           if (var23.c() < (float)var2.f() * var30) {
                              var23.b((float)var2.f() * var30);
                           }
                        }

                        if (var44 == 0 && var36 <= 0) {
                           var1.J().d(var35.b() * var1.J().c() / var17);
                        }

                        String var79;
                        if (var36 > 0 && var39[var44] != null) {
                           var79 = var39[var44];
                        } else {
                           var79 = "";
                           if (var22) {
                              var20 = var44 < var11.size() ? ((zfp)var11.get(var44)).c() : "";
                              var21 = var44 < var11.size() ? ((zfp)var11.get(var44)).b() : false;
                              if (var6.ah() != 60 && var6.ah() != 12) {
                                 var79 = zpw.a(var49.al(), var8.get(var44), var20, var21);
                              } else {
                                 var79 = zpw.a(var49.al(), com.aspose.cells.b.a.ze.g(var8.get(var44)) * Math.pow(10.0D, var1.T().f()), var18, var19);
                              }
                           } else {
                              var79 = a(var1, var8.get(var44));
                           }

                           var39[var44] = var79;
                        }

                        float var46;
                        float var47;
                        if (var36 <= 0) {
                           var46 = zbsq.a(var0, var79, var16.a(), !var10);
                           var47 = zbsq.b(var0, var79, var16.a()).b();
                           var37[var44][0] = var46;
                           var37[var44][1] = var47;
                        } else {
                           var46 = var37[var44][0];
                           var47 = var37[var44][1];
                        }

                        if (var46 > var42) {
                           var42 = var46;
                        }

                        if (var47 > var43) {
                           var43 = var47;
                        }

                        new com.aspose.cells.b.a.b.zs(0, 0);
                        com.aspose.cells.b.a.b.zs var48;
                        if (var13) {
                           var48 = zbsq.a(var0, var79, var16.d(), var16.a(), (com.aspose.cells.b.a.b.zt)var23, 1, 1);
                        } else if (var36 <= 0) {
                           var48 = zbsq.a(var0, var79, var16.a());
                           var38[var44] = var48;
                        } else {
                           var48 = var38[var44];
                        }

                        if (var48.b() > var51) {
                           var51 = var48.b();
                        }

                        if (var48.c() > var27) {
                           var27 = var48.c();
                        }

                        if (var44 == 0) {
                           if (var5) {
                              var28 = var48.c() / 2;
                           } else {
                              var28 = var48.b() / 2;
                           }
                        }

                        if (var44 == var8.size() - 1) {
                           if (var5) {
                              var29 = var48.c() / 2;
                           } else {
                              var29 = var48.b() / 2;
                           }
                        }
                     }

                     ++var36;
                     var1.h = (float)var27;
                     var1.i = (float)var51;
                     if (var13 && var42 > var40) {
                        if (var5) {
                           if (var16.d() == 0 && (float)var27 > (float)var35.c() * 1.5F) {
                              var16.b(45);
                              continue;
                           }

                           if (var16.d() == 45) {
                              double var78 = (double)Math.abs(var16.d()) / 180.0D * 3.141592653589793D;
                              double var80 = (double)var43 * Math.cos(var78) + (double)var35.c() * Math.sin(var78);
                              if (var80 > (double)var51) {
                                 var16.b(90);
                                 continue;
                              }
                           }
                        } else if (!var14) {
                           if (var16.d() == 0 && (float)var27 > (float)var35.c() * 1.5F) {
                              if ((double)var40 <= (double)var35.c() * 1.4D) {
                                 var16.b(90);
                              } else {
                                 var16.b(45);
                              }
                              continue;
                           }

                           if (var16.d() == 45 && (double)var40 <= (double)var35.c() * 1.4D) {
                              var16.b(90);
                              continue;
                           }
                        } else if (var16.d() != 90) {
                           var16.b(90);
                           continue;
                        }
                     } else if (var5) {
                        if ((double)(var23.c() / (float)var27) > 2.5D && (double)var30 > 0.2D && var23.b() * 4.0F / 5.0F > var42) {
                           var30 = var30 * 4.0F / 5.0F;
                           continue;
                        }
                     } else if (var23.b() / (float)var51 > 2.0F && (double)var30 > 0.3D) {
                        var30 = var30 * 4.0F / 5.0F;
                        continue;
                     }

                     if (!var1.K() || var34) {
                        break label844;
                     }

                     if (var5) {
                        if ((var51 != var31 || var27 != var32 || var33 != var23.c()) && (float)var27 > var23.c() - 5.0F && var1.H() < var50) {
                           var31 = var51;
                           var32 = var27;
                           var33 = var23.c();
                           var1.k(var1.H() + var25);
                        } else {
                           if (var1.H() <= 1) {
                              break label844;
                           }

                           var1.k(var1.H() - var25);
                           if (var1.H() < 1) {
                              var1.k(1);
                           }

                           var34 = true;
                        }
                     } else if ((var51 != var31 || var27 != var32 || var33 != var23.b()) && (!var49.aa() && (float)var51 > var23.b() - 5.0F && var51 < var35.b() * 4 || var49.aa() && (float)var51 > var23.b()) && var1.H() < var50) {
                        var31 = var51;
                        var32 = var27;
                        var33 = var23.b();
                        var1.k(var1.H() + var25);
                     } else {
                        if (var1.H() <= 1) {
                           break label844;
                        }

                        var1.k(var1.H() - var25);
                        if (var1.H() < 1) {
                           var1.k(1);
                        }

                        var34 = true;
                     }
                  }
               }
            }

            if (var1.p()) {
               var44 = var28;
               var28 = var29;
               var29 = var44;
            }
         } else if (var16.d() != 0 && var16.d() != 90 && var16.d() != -90) {
            if (var16.d() == 255) {
               com.aspose.cells.b.a.b.zs var52 = zbsq.a(var0, "H", var16.a());
               String var53 = "";

               for(var32 = 0; var32 < var8.size(); var32 += var1.H()) {
                  if (var32 == 0) {
                     var1.J().d(zbuk.c((double)(var52.b() * var1.J().c() / var17)));
                  }

                  String var56 = "";
                  if (var7) {
                     if (var22 && var13) {
                        var56 = a(var1, var8.get(var32));
                        Iterator var59 = var11.iterator();

                        while(var59.hasNext()) {
                           zfp var57 = (zfp)var59.next();
                           if (zia.a(var57.a(), var49.X()) == com.aspose.cells.b.a.ze.f(var8.get(var32))) {
                              var20 = var57.c();
                              var21 = var57.b();
                              var56 = zpw.a(var1.e().al(), var8.get(var32), var20, var21);
                              break;
                           }
                        }
                     } else {
                        var56 = a(var1, var8.get(var32));
                     }
                  } else if (var22) {
                     var20 = var32 < var11.size() ? ((zfp)var11.get(var32)).c() : "";
                     var21 = var32 < var11.size() ? ((zfp)var11.get(var32)).b() : false;
                     if (var6.av()) {
                        var56 = zpw.a(var1.e().al(), com.aspose.cells.b.a.ze.g(var8.get(var32)) * Math.pow(10.0D, var1.T().f()), var18, var19);
                     } else {
                        var56 = zpw.a(var1.e().al(), var8.get(var32), var20, var21);
                     }
                  } else {
                     var56 = a(var1, var8.get(var32));
                  }

                  if (var56.length() > var53.length()) {
                     var53 = var56;
                  }
               }

               var51 = var52.b();
               var27 = var53.length() * var52.c();
               if (var27 > var2.f() / 2) {
                  var27 = var2.f() / 2;
               }

               var1.h = (float)var27;
               var1.i = (float)var51;
            } else {
               var30 = 0.5F;
               float var54 = 0.0F;
               com.aspose.cells.b.a.b.zs var55 = zbsq.a(var0, "a", var16.a());

               label973: {
                  while(!var6.av()) {
                     if (var5) {
                        var54 = (float)(var2.f() / var50 * var1.H());
                     } else {
                        var54 = (float)(var2.e() / var50 * var1.H());
                     }

                     if (!var1.K() || var1.H() >= var50 || var54 >= (float)var55.c()) {
                        break label973;
                     }

                     var1.k(var1.H() + var25);
                  }

                  com.aspose.cells.b.a.b.zt var64 = zbsq.c(var0, "3", var16.a());
                  if (var5) {
                     var54 = (float)(var2.f() / var8.size());
                     var54 += var64.c();
                  } else {
                     var54 = (float)(var2.e() / var8.size());
                     var54 += var64.b();
                  }
               }

               for(int var66 = 0; var66 < var8.size(); ++var66) {
                  int var60 = var8.size() - 1 - var66;
                  if (var5) {
                     if (var1.p()) {
                        if (var16.d() > 0) {
                           var23.a((float)var2.e() * var30);
                           var23.b((float)var2.f() - (float)var66 * var54 - var54 / 2.0F);
                        } else {
                           var23.a((float)var2.e() * var30);
                           var23.b((float)var2.f() - (float)var60 * var54 - var54 / 2.0F);
                        }
                     } else if (var16.d() > 0) {
                        var23.a((float)var2.e() * var30);
                        var23.b((float)var2.f() - (float)var60 * var54 - var54 / 2.0F);
                     } else {
                        var23.a((float)var2.e() * var30);
                        var23.b((float)var2.f() - (float)var66 * var54 - var54 / 2.0F);
                     }
                  } else if (var1.p()) {
                     if (var16.d() > 0) {
                        var23.a((float)var2.e() - (float)var66 * var54 - var54 / 2.0F);
                        var23.b((float)var2.f() * var30);
                     } else {
                        var23.a((float)var2.e() - (float)var60 * var54 - var54 / 2.0F);
                        var23.b((float)var2.f() * var30);
                     }
                  } else if (var16.d() > 0) {
                     var23.a((float)var2.e() - (float)var60 * var54 - var54 / 2.0F);
                     var23.b((float)var2.f() * var30);
                  } else {
                     var23.a((float)var2.e() - (float)var66 * var54 - var54 / 2.0F);
                     var23.b((float)var2.f() * var30);
                  }

                  if (var23.b() < (float)var2.e() * var30) {
                     var23.a((float)var2.e() * var30);
                  }

                  if (var23.c() < (float)var2.f() * var30) {
                     var23.b((float)var2.f() * var30);
                  }

                  if (var66 == 0) {
                     var55 = zbsq.a(var0, "a", var16.a());
                     var1.J().d(var55.b() * var1.J().c() / var17);
                     var1.J().d(var1.J().k() * 2);
                  }

                  String var58 = "";
                  if (var22) {
                     var20 = var66 < var11.size() ? ((zfp)var11.get(var66)).c() : "";
                     var21 = var66 < var11.size() ? ((zfp)var11.get(var66)).b() : false;
                     if (var6.ah() != 60 && var6.ah() != 12) {
                        var58 = zpw.a(var49.al(), var8.get(var66), var20, var21);
                     } else {
                        var58 = zpw.a(var49.al(), com.aspose.cells.b.a.ze.g(var8.get(var66)) * Math.pow(10.0D, var1.T().f()), var18, var19);
                     }
                  } else {
                     var58 = a(var1, var8.get(var66));
                  }

                  com.aspose.cells.b.a.b.zs var63 = zbsq.a(var0, var58, var16.d(), var16.a(), (com.aspose.cells.b.a.b.zt)var23, 1, 1);
                  if (var63.b() > var51) {
                     var51 = var63.b();
                  }

                  if (var63.c() > var27) {
                     var27 = var63.c();
                  }

                  int var65 = var51;
                  if (var5) {
                     var65 = var27;
                  }

                  float var72;
                  float var75;
                  switch(var1.a()) {
                  case 0:
                     if (var1.p()) {
                        if (var16.d() > 0) {
                           var72 = (float)var60 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var28) {
                                 var28 = (int)var75;
                              }
                           }
                        } else {
                           var72 = (float)var66 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var29) {
                                 var29 = (int)var75;
                              }
                           }
                        }
                     } else if (var16.d() > 0) {
                        var72 = (float)var66 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var28) {
                              var28 = (int)var75;
                           }
                        }
                     } else {
                        var72 = (float)var60 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var29) {
                              var29 = (int)var75;
                           }
                        }
                     }
                     break;
                  case 1:
                     if (var1.p()) {
                        if (var16.d() > 0) {
                           var72 = (float)var60 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var28) {
                                 var28 = (int)var75;
                              }
                           }
                        } else {
                           var72 = (float)var66 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var29) {
                                 var29 = (int)var75;
                              }
                           }
                        }
                     } else if (var16.d() > 0) {
                        var72 = (float)var66 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var28) {
                              var28 = (int)var75;
                           }
                        }
                     } else {
                        var72 = (float)var60 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var29) {
                              var29 = (int)var75;
                           }
                        }
                     }
                     break;
                  case 2:
                     if (var1.p()) {
                        if (var16.d() < 0) {
                           var72 = (float)var60 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var28) {
                                 var28 = (int)var75;
                              }
                           }
                        } else {
                           var72 = (float)var66 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var29) {
                                 var29 = (int)var75;
                              }
                           }
                        }
                     } else if (var16.d() < 0) {
                        var72 = (float)var66 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var28) {
                              var28 = (int)var75;
                           }
                        }
                     } else {
                        var72 = (float)var60 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var29) {
                              var29 = (int)var75;
                           }
                        }
                     }
                     break;
                  case 3:
                     if (var1.p()) {
                        if (var16.d() < 0) {
                           var72 = (float)var60 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var28) {
                                 var28 = (int)var75;
                              }
                           }
                        } else {
                           var72 = (float)var66 * var54 + var54 / 2.0F;
                           if ((float)var65 > var72) {
                              var75 = (float)var65 - var72;
                              if (var75 > (float)var29) {
                                 var29 = (int)var75;
                              }
                           }
                        }
                     } else if (var16.d() < 0) {
                        var72 = (float)var66 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var28) {
                              var28 = (int)var75;
                           }
                        }
                     } else {
                        var72 = (float)var60 * var54 + var54 / 2.0F;
                        if ((float)var65 > var72) {
                           var75 = (float)var65 - var72;
                           if (var75 > (float)var29) {
                              var29 = (int)var75;
                           }
                        }
                     }
                  }
               }

               var1.i = (float)var51;
               var1.h = (float)var27;
            }
         } else {
            var30 = 0.5F;
            var31 = 0;
            var32 = 0;
            var33 = 0.0F;
            var34 = false;
            if (!var49.B().s()) {
               var34 = true;
            }

            var35 = zbsq.a(var0, "a", var16.a());
            var36 = 0;
            String[] var61 = new String[var8.size()];

            int var68;
            label919:
            while(true) {
               while(true) {
                  var51 = 0;
                  var27 = 0;
                  var28 = 0;
                  var29 = 0;
                  if (var6.av()) {
                     com.aspose.cells.b.a.b.zt var67 = zbsq.c(var0, "3", var16.a());
                     if (var5) {
                        var23.b((float)var2.f() / (float)var8.size());
                        var23.a((float)var2.e() * var30);
                        var23.b(var23.c() + (float)zbuk.a((double)var67.c()));
                     } else {
                        var23.a((float)var2.e() / (float)var8.size());
                        var23.b((float)var2.f() * var30);
                        var23.a(var23.b() + (float)zbuk.a((double)var67.b()));
                     }
                  } else if (var5) {
                     var23.b((float)var2.f() / (float)var50 * (float)var1.H());
                     var23.a((float)var2.e() * var30);
                     if (!var49.B().s() && var49.D()) {
                        if (var1.m == 2) {
                           if (var23.b() < (float)(var3.i() - var2.i())) {
                              var23.a((float)(var3.i() - var2.i()));
                           }
                        } else if (var1.m == 1 && var23.b() < (float)(var2.c() - var3.c())) {
                           var23.a((float)(var2.c() - var3.c()));
                        }
                     }

                     if (var1.K()) {
                        if (Math.abs(var16.d()) == 0 && var1.H() < var50) {
                           if (var23.c() < (float)var35.c()) {
                              var1.k(var1.H() + var25);
                              continue;
                           }
                        } else if (Math.abs(var16.d()) == 90 && var23.c() < (float)var35.b() && var1.H() < var50) {
                           var1.k(var1.H() + var25);
                           continue;
                        }
                     }
                  } else {
                     if (var15 > var1.H()) {
                        var23.a((float)var2.e() / (float)var50 * (float)var15);
                     } else {
                        var23.a((float)var2.e() / (float)var50 * (float)var1.H());
                        var23.a(var23.b() + 3.0F);
                     }

                     if (!var49.B().s() && var49.D() && !var49.aa()) {
                        if (var2.j() <= var3.j()) {
                           var23.b((float)var3.f() * var30);
                           var68 = zbuk.c((double)(var35.b() * var1.J().c() / var17));
                           int var70 = var68 + var1.ab() + var1.aa();
                           int var74 = var3.j() - var2.j() - var70 - zia.b / 2;
                           if (var23.c() > (float)var74) {
                              var23.b((float)var74);
                              if (var23.c() < (float)var2.f() * 0.25F) {
                                 var23.b((float)var2.f() * 0.25F);
                              }
                           }
                        } else {
                           var23.b(0.0F);
                        }
                     } else {
                        var23.b((float)var3.f() * var30);
                     }

                     if (var1.K()) {
                        if (Math.abs(var16.d()) == 0) {
                           if (var23.b() < (float)var35.b()) {
                              var1.k(var1.H() + var25);
                              continue;
                           }
                        } else if (Math.abs(var16.d()) == 90 && var23.b() < (float)var35.c()) {
                           var1.k(var1.H() + var25);
                           continue;
                        }
                     }
                  }

                  for(var68 = 0; var68 < var8.size(); var68 += var1.H()) {
                     if (var68 == 0 && var36 <= 0) {
                        var1.J().d(zbuk.c((double)(var35.b() * var1.J().c() / var17)));
                     }

                     String var71;
                     if (var36 > 0 && var61[var68] != null) {
                        var71 = var61[var68];
                     } else {
                        var71 = "";
                        if (var22) {
                           var20 = var68 < var11.size() ? ((zfp)var11.get(var68)).c() : "";
                           var21 = var68 < var11.size() ? ((zfp)var11.get(var68)).b() : false;
                           if (var6.av()) {
                              var71 = zpw.a(var49.al(), com.aspose.cells.b.a.ze.g(var8.get(var68)) * Math.pow(10.0D, var1.T().f()), var18, var19);
                           } else {
                              var71 = zpw.a(var49.al(), var8.get(var68), var20, var21);
                           }
                        } else {
                           var71 = a(var1, var8.get(var68));
                        }

                        var61[var68] = var71;
                     }

                     com.aspose.cells.b.a.b.zs var76 = zbsq.a(var0, var71, var16.d(), var16.a(), (com.aspose.cells.b.a.b.zt)var23, 1, 1);
                     if (var76.b() > var51) {
                        var51 = var76.b();
                     }

                     if (var76.c() > var27) {
                        var27 = var76.c();
                     }

                     if (var68 == 0) {
                        if (var5) {
                           var28 = var76.c() / 2;
                        } else {
                           var28 = var76.b() / 2;
                        }
                     }

                     if (var68 == var8.size() - 1) {
                        if (var5) {
                           var29 = var76.c() / 2;
                        } else {
                           var29 = var76.b() / 2;
                        }
                     }
                  }

                  ++var36;
                  var1.h = (float)var27;
                  var1.i = (float)var51;
                  if (!var7) {
                     if (var5) {
                        if ((double)(var23.c() / (float)var27) > 2.5D && (double)var30 > 0.3D) {
                           var30 = var30 * 4.0F / 5.0F;
                           continue;
                        }
                     } else if (var23.b() / (float)var51 > 2.0F && (double)var30 > 0.3D) {
                        var30 = var30 * 4.0F / 5.0F;
                        continue;
                     }
                  }

                  if (!var1.K() || var34) {
                     break label919;
                  }

                  if (var5) {
                     if ((var51 != var31 || var27 != var32) && (float)var27 > var23.c() - 5.0F && var1.H() < var50) {
                        var31 = var51;
                        var32 = var27;
                        var33 = var23.c();
                        var1.k(var1.H() + var25);
                     } else {
                        if (var1.H() <= 1) {
                           break label919;
                        }

                        var1.k(var1.H() - var25);
                        if (var1.H() < 1) {
                           var1.k(1);
                        }

                        var34 = true;
                     }
                  } else if ((var51 != var31 || var27 != var32) && (float)var51 > var23.b() - 5.0F && var1.H() < var50) {
                     var31 = var51;
                     var32 = var27;
                     var33 = var23.b();
                     var1.k(var1.H() + var25);
                  } else {
                     if (var1.H() <= 1) {
                        break label919;
                     }

                     var1.k(var1.H() - var25);
                     if (var1.H() < 1) {
                        var1.k(1);
                     }

                     var34 = true;
                  }
               }
            }

            if (var1.p()) {
               var68 = var28;
               var28 = var29;
               var29 = var68;
            }
         }

         if (var12 != null && var12.length > 0 && var11.size() > 0) {
            var30 = 0.0F;
            if (var6.av()) {
               if (var5) {
                  var30 = (float)(var2.f() / var8.size());
               } else {
                  var30 = (float)(var2.e() / var8.size());
               }
            } else if (var5) {
               var30 = (float)(var2.f() / var50);
            } else {
               var30 = (float)(var2.e() / var50);
            }

            var1.k(1);
            byte var77 = 0;
            if (var5) {
               var77 = 90;
            }

            for(var32 = 0; var32 < var12.length; ++var32) {
               ArrayList var69 = var12[var32];
               if (var5) {
                  var23.b((float)(var2.f() / var69.size()));
                  var23.a((float)var2.e() * 0.5F);
               } else {
                  var23.a((float)(var2.e() / var69.size()));
                  var23.b((float)var2.f() * 0.5F);
               }

               com.aspose.cells.b.a.b.zs var62 = a(var0, var69, var77, var16, var23, (double)var30);
               if (var5) {
                  var51 += var62.b();
               } else {
                  var27 += var62.c();
               }
            }
         }

         var1.f = (float)var51;
         var1.g = (float)var27;
         if (a(var1, var6)) {
            if (var5) {
               var1.j = (float)var27 / 2.0F;
            } else {
               var1.j = (float)var51 / 2.0F;
            }

            var1.k = var1.j;
         } else if (b(var1, var6)) {
            var1.j = (float)var28;
            var1.k = (float)var29;
         }

         return new com.aspose.cells.b.a.b.zs(var51, var27);
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   private static int b(zbp var0) {
      zig var1 = var0.e();
      boolean var4 = false;
      ArrayList var2;
      ArrayList[] var3;
      if (var0.g() == 0) {
         var2 = var1.z().c();
         var3 = var1.z().e();
         var4 = var1.z().b;
      } else {
         var2 = var1.z().d();
         var3 = var1.z().g();
         var4 = var1.z().c;
      }

      if (!var4) {
         return 1;
      } else if (var2.size() == 1) {
         return 1;
      } else {
         boolean var5 = true;
         int var6 = Integer.MAX_VALUE;
         float var7 = 0.0F;
         float var8 = 0.0F;
         boolean var9 = true;

         for(int var10 = 0; var10 < var2.size(); ++var10) {
            zfp var11 = (zfp)var2.get(var10);
            if (var11.a() != null && !var11.a().equals("")) {
               if (var9) {
                  if (var10 == 0) {
                     var7 = 100.0F;
                  }

                  if (var7 <= 0.0F) {
                     return 1;
                  }

                  var9 = false;
               } else {
                  if (var10 == var2.size()) {
                     var8 = 100.0F;
                  }

                  var8 = var7 < var8 / 2.0F ? var7 : var8 / 2.0F;
                  var7 = var8;
                  int var12 = zbuk.c((double)(var8 + 1.0F + var8));
                  if (var12 <= 1) {
                     return 1;
                  }

                  if (var12 < var6) {
                     var6 = var12;
                  }
               }
            } else if (var9) {
               ++var7;
            } else {
               ++var8;
            }
         }

         return var6 == Integer.MAX_VALUE ? 1 : var6;
      }
   }

   static boolean a(zbp var0, zbcq var1) {
      if (var0.q() && var0.I() != 3) {
         if (var0.g() != 1 && var0.g() != 3 && var1.ah() != 60 && var1.ah() != 12) {
            return !var0.f() && var0.J().d() == 0 && var1.ah() != 57 && var1.ah() != 59;
         } else {
            return true;
         }
      } else {
         return false;
      }
   }

   static boolean b(zbp var0, zbcq var1) {
      if (var0.q() && var0.I() != 3) {
         if (a(var0, var1)) {
            return false;
         } else {
            return (var0.g() == 0 || var0.g() == 2) && var0.f() && var1.ah() != 57 && var1.ah() != 59 && Math.abs(var0.J().d()) != 90 && var0.J().d() != 0;
         }
      } else {
         return false;
      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, List var1, int var2, zbtk var3, com.aspose.cells.b.a.b.zt var4, double var5) {
      zig var7 = var3.f().e();
      var4.a(var4.b() + 4.0F);
      int var8 = 0;
      int var9 = 0;

      for(int var10 = 0; var10 < var1.size(); ++var10) {
         zfp var11 = (zfp)var1.get(var10);
         int var12 = a((zafr)var11);
         float var13 = (float)((double)var12 * var5);
         if (var13 < var4.b()) {
            var4.a(var13);
         }

         String var14 = zpw.a(var7.al(), var11.a(), var11.c(), var11.b());
         com.aspose.cells.b.a.b.zs var15 = zbsq.a(var0, var14, var2, var3.a(), (com.aspose.cells.b.a.b.zt)var4, 1, 1);
         if (var15.b() > var8) {
            var8 = var15.b();
         }

         if (var15.c() > var9) {
            var9 = var15.c();
         }
      }

      return new com.aspose.cells.b.a.b.zs(var8, var9);
   }

   static void b(zn var0, zbp var1, zbcq var2, boolean var3) {
      if (var1.I() != 3) {
         zig var4 = var1.e();
         zje var5 = var2.E().b(0);
         int var6 = var2.ah();
         zbtk var7 = var1.J();
         String var8 = var5.z();
         boolean var9 = var5.A();
         boolean var10 = false;
         if (var7.h() && var5 != null) {
            var10 = true;
         }

         int var11 = 0;
         int var12 = 0;

         int var13;
         for(var13 = 0; var13 < var1.l.size(); ++var13) {
            if (var13 == 0 || var13 == var1.l.size() - 1) {
               String var14 = "";
               double var15 = (Double)var1.l.get(var13) * Math.pow(10.0D, var1.T().f());
               if (var10) {
                  if (zia.b(var6)) {
                     var8 = "0%";
                  }

                  var14 = zpw.a(var4.al(), var15, var8, var9);
               } else {
                  var14 = a((zbp)var1, (Object)var15);
               }

               com.aspose.cells.b.a.b.zs var17 = zbsq.a(var1.e().ap(), var14, var7.d(), var7.a(), (com.aspose.cells.b.a.b.zs)var1.e().B().b.b(), 1, 1);
               if (var13 == 0) {
                  if (var3) {
                     var11 = var17.b() / 2;
                  } else {
                     var11 = var17.c() / 2;
                  }
               }

               if (var13 == var1.l.size() - 1) {
                  if (var3) {
                     var12 = var17.b() / 2;
                  } else {
                     var12 = var17.c() / 2;
                  }
               }
            }
         }

         if (var1.p()) {
            var13 = var11;
            var11 = var12;
            var12 = var13;
         }

         var1.j = (float)var11;
         var1.k = (float)var12;
      }
   }

   static DateTime a(double var0, boolean var2) {
      return zbuk.a(var0, var2);
   }

   static int a(DateTime var0, boolean var1) {
      return (int)zbuk.a(var0, var1);
   }

   static String a(zbp var0, Object var1) {
      String var2 = var0.J().b();
      boolean var3 = var0.J().i();
      String var4 = "";
      if ((var0.g() == 0 || var0.g() == 2) && var0.k() == 2) {
         DateTime var5 = a((double)com.aspose.cells.b.a.ze.f(var1), var0.e().X());
         if (!"".equals(var2)) {
            try {
               var5.b(var2);
            } catch (Exception var7) {
               if (var0.j() == 1) {
                  var2 = "M/d/yyyy";
               } else if (var0.j() == 2) {
                  var2 = "MMM-yy";
               } else {
                  var2 = "yyyy";
               }
            }
         } else if (var0.j() == 1) {
            var2 = "M/d/yyyy";
         } else if (var0.j() == 2) {
            var2 = "MMM-yy";
         } else {
            var2 = "yyyy";
         }

         if (com.aspose.cells.b.a.ze.f(var1) == 60) {
            var4 = zgc.a(var0.e().al(), var1, var2);
            if (var2.indexOf("d") >= 0 && var4.indexOf("28") >= 0) {
               var4 = com.aspose.cells.b.a.zv.a(var4, "28", "29");
            }
         } else {
            var4 = zgc.a(var0.e().al(), var5, var2);
         }
      } else {
         var4 = zpw.a(var0.e().al(), var1, var2, var3);
      }

      return var4;
   }

   static int a(int var0, int var1, int var2, boolean var3) {
      DateTime var5 = a((double)var1, var3);
      DateTime var6 = a((double)var2, var3);
      int var4;
      if (var0 == 1) {
         var4 = var1 - var2;
      } else if (var0 == 2) {
         var4 = (var5.getYear() - var6.getYear()) * 12 + var5.getMonth() - var6.getMonth();
      } else {
         var4 = var5.getYear() - var6.getYear();
      }

      return var4;
   }

   static int b(int var0, int var1, int var2, boolean var3) {
      DateTime var5 = a((double)var1, var3);
      DateTime var6 = a((double)var2, var3);
      int var4;
      if (var0 == 1) {
         var4 = var1 - var2;
      } else if (var0 == 2) {
         var4 = (var5.getYear() - var6.getYear()) * 12 + var5.getMonth() - var6.getMonth();
         if (var5.getDay() - var6.getDay() > 0) {
            ++var4;
         }
      } else {
         var4 = var5.getYear() - var6.getYear();
         if (var5.getMonth() - var6.getMonth() > 0 || var5.getDay() - var6.getDay() > 0) {
            ++var4;
         }
      }

      return var4;
   }

   static int a(int var0, int var1, int var2, int var3, boolean var4) {
      DateTime var5 = a((double)var3, var4);
      DateTime var6;
      if (var0 == 1) {
         if (var1 == 1) {
            var6 = var5.addDays((double)var2);
         } else if (var1 == 2) {
            var6 = var5.addMonths(var2);
         } else {
            var6 = var5.addYears(var2);
         }
      } else if (var0 == 2) {
         if (var1 == 2) {
            var6 = var5.addMonths(var2);
         } else {
            var6 = var5.addYears(var2);
         }
      } else {
         var6 = var5.addYears(var2);
      }

      return a(var6, var4);
   }

   static int a(int var0, int var1, boolean var2) {
      if (var0 == 1) {
         return var1;
      } else {
         DateTime var3;
         DateTime var4;
         if (var0 == 2) {
            var3 = a((double)var1, var2);
            var4 = new DateTime(var3.getYear(), var3.getMonth(), 1);
            return a(var4, var2);
         } else {
            var3 = a((double)var1, var2);
            var4 = new DateTime(var3.getYear(), 1, 1);
            return a(var4, var2);
         }
      }
   }

   static int a(zafr var0) {
      int var1 = 0;
      if (var0.d() != null && var0.d().getCount() != 0) {
         for(int var2 = 0; var2 < var0.d().getCount(); ++var2) {
            var1 += a(var0.d().a(var2));
         }

         return var1;
      } else {
         return 1;
      }
   }

   private static void a(zn var0, ArrayList[] var1, float var2, float var3, float var4, boolean var5, zbp var6, double var7, zbtk var9, int var10, float var11, com.aspose.cells.b.a.b.zp var12, boolean var13) {
      zig var14 = var9.f().e();
      byte var15 = 0;
      float var16 = var3;

      for(int var17 = 0; var17 < var1.length; ++var17) {
         ArrayList var18 = var1[var17];
         com.aspose.cells.b.a.b.zt var19 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         if (var13) {
            var19.b((float)(var12.f() / var18.size()));
            var19.a((float)var12.e() * 0.5F);
         } else {
            var19.a((float)(var12.e() / var18.size()));
            var19.b((float)var12.f() * 0.5F);
         }

         com.aspose.cells.b.a.b.zs var20 = a(var0, var18, var15, var9, var19, var7);
         float var21 = var2;

         for(int var22 = 0; var22 < var18.size(); ++var22) {
            zfp var23 = (zfp)var18.get(var22);
            String var24 = zpw.a(var14.al(), var23.a(), var23.c(), var23.b());
            int var25 = a((zafr)var23);
            float var26 = (float)((double)var25 * var7);
            float var27;
            if (!var6.p()) {
               var27 = var21;
            } else {
               var27 = var21 - var26;
            }

            float var28 = var5 ? var16 : var16 - (float)var20.c();
            com.aspose.cells.b.a.b.zq var29 = new com.aspose.cells.b.a.b.zq(var27, var28, var26, (float)var20.c());
            b(var0, com.aspose.cells.b.a.b.zp.a(var29), var24, var15, var9.a(), var9.g(), 1, var10);
            var6.l().a(var21, var11, var21, var16);
            if (var6.E() != 2) {
               float var30 = var5 ? var16 + var4 + (float)var20.c() : var16 - (var4 + (float)var20.c());
               a(var0, var23.d(), var21, var11, var30, var5, var6, var7);
            }

            if (!var6.p()) {
               var21 += var26;
            } else {
               var21 -= var26;
            }
         }

         var6.l().a(var21, var11, var21, var16);
         if (var5) {
            var16 += var4 + (float)var20.c();
         } else {
            var16 -= var4 + (float)var20.c();
         }
      }

   }

   private static void a(zn var0, zafs var1, float var2, float var3, float var4, boolean var5, zbp var6, double var7) {
      float var9 = var2;

      for(int var10 = 0; var10 < var1.getCount(); ++var10) {
         zfp var11 = (zfp)var1.a(var10);
         int var12 = a((zafr)var11);
         float var13 = (float)((double)var12 * var7);
         if (!var6.p()) {
            var9 += var13;
         } else {
            var9 -= var13;
         }

         var6.l().a(var9, var3, var9, var4);
      }

   }

   static zbp a(zbp var0) {
      zbp var1 = null;
      if (var0.g() == 0) {
         var1 = var0.e().G();
      } else if (var0.g() == 2) {
         var1 = var0.e().I();
      } else if (var0.g() == 1) {
         var1 = var0.e().e();
      } else if (var0.g() == 3) {
         var1 = var0.e().g();
      }

      return var1;
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zp var1, String var2, int var3, com.aspose.cells.b.a.b.zg var4, Color var5, int var6, int var7) {
      a(var0, var1, var2, var3, var4, var5, var6, var7, (com.aspose.cells.b.a.b.zv)null);
   }

   public static void a(zn var0, com.aspose.cells.b.a.b.zp var1, String var2, int var3, com.aspose.cells.b.a.b.zg var4, Color var5, int var6, int var7, com.aspose.cells.b.a.b.zv var8) {
      com.aspose.cells.b.a.b.zv var9;
      if (var8 == null) {
         var9 = new com.aspose.cells.b.a.b.zv();
      } else {
         var9 = new com.aspose.cells.b.a.b.zv(var8);
      }

      var9.a(zbsq.a(var6));
      var9.c(zbsq.a(var7));
      switch(Math.abs(var3)) {
      case 0:
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var9);
         break;
      case 90:
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         var1 = new com.aspose.cells.b.a.b.zp(-var1.f() / 2, -var1.e() / 2, var1.f(), var1.e());
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var9);
         var0.d();
         break;
      default:
         double var10 = Math.sqrt(Math.pow((double)var1.e(), 2.0D) + Math.pow((double)var1.f(), 2.0D));
         var9.b(4096);
         com.aspose.cells.b.a.b.zt var12 = var0.a(var2, var4, (int)var10, var9);
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         com.aspose.cells.b.a.b.zq var13 = new com.aspose.cells.b.a.b.zq(-var12.b() / 2.0F, -var12.c() / 2.0F, var12.b(), var12.c());
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zq)var13, var9);
         var0.d();
      }

   }

   public static void b(zn var0, com.aspose.cells.b.a.b.zp var1, String var2, int var3, com.aspose.cells.b.a.b.zg var4, Color var5, int var6, int var7) {
      com.aspose.cells.b.a.b.zv var8 = new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c());
      var8.a(zbsq.a(var6));
      var8.c(zbsq.a(var7));
      switch(Math.abs(var3)) {
      case 0:
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var8);
         break;
      case 90:
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         var1 = new com.aspose.cells.b.a.b.zp(-var1.f() / 2, -var1.e() / 2, var1.f(), var1.e());
         var8.d(3);
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zp)var1, var8);
         var0.d();
         break;
      default:
         double var9 = Math.sqrt(Math.pow((double)var1.e(), 2.0D) + Math.pow((double)var1.f(), 2.0D));
         var8.b(4096);
         com.aspose.cells.b.a.b.zt var11 = var0.a(var2, var4, (int)var9, var8);
         var0.b((float)(var1.g() + var1.e() / 2), (float)(var1.h() + var1.f() / 2));
         var0.a((float)(-var3));
         com.aspose.cells.b.a.b.zq var12 = new com.aspose.cells.b.a.b.zq(-var11.b() / 2.0F, -var11.c() / 2.0F, var11.b(), var11.c());
         var0.a(var2, var4, new com.aspose.cells.b.a.b.zu(var5), (com.aspose.cells.b.a.b.zq)var12, var8);
         var0.d();
      }

   }

   static void a(zn var0, String var1, com.aspose.cells.b.a.b.zo var2, com.aspose.cells.b.a.b.zt var3, int var4, com.aspose.cells.b.a.b.zg var5, Color var6, int var7) throws Exception {
      com.aspose.cells.b.a.b.zu var8 = new com.aspose.cells.b.a.b.zu(var6);
      com.aspose.cells.b.a.b.zv var9 = new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c());
      var9.d(3);
      com.aspose.cells.b.a.b.zt var10 = var0.a(var1, var5, var2, new com.aspose.cells.b.a.b.zv(com.aspose.cells.b.a.b.zv.c()));
      double var11 = (double)Math.abs(var4) / 180.0D * 3.141592653589793D;
      float var13 = (float)((double)var10.b() * Math.cos(var11) + (double)var10.c() * Math.sin(var11));
      float var14 = 0.0F;
      if (var13 <= var3.b()) {
         var14 = var10.b();
      } else {
         var14 = (float)(((double)var3.b() - (double)var10.c() * Math.sin(var11)) / Math.cos(var11));
      }

      float var15 = (float)((double)var10.c() * Math.sin(var11)) / 2.0F;
      var0.b(var2.d(), var2.e());
      var0.a((float)(-var4));
      com.aspose.cells.b.a.b.zq var16 = com.aspose.cells.b.a.b.zq.c();
      if (var7 == 0) {
         if (var4 > 0) {
            var16 = new com.aspose.cells.b.a.b.zq(-var14, 0.0F, var14, var10.c());
            var9.a(2);
            var0.b(-var15, 0.0F);
         } else {
            var16 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, var14, var10.c());
            var9.a(0);
            var0.b(var15, 0.0F);
         }

         var16.b(var16.g() - var10.c() / 2.0F);
      } else if (var7 == 3) {
         if (var4 < 0) {
            var16 = new com.aspose.cells.b.a.b.zq(-var14, 0.0F, var14, var10.c());
            var9.a(2);
            var0.b(-var15, 0.0F);
         } else {
            var16 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, var14, var10.c());
            var9.a(0);
            var0.b(var15, 0.0F);
         }

         var16.b(var16.g() - var10.c() / 2.0F);
      } else if (var7 == 1) {
         var16 = new com.aspose.cells.b.a.b.zq(-var14, -var10.c() / 2.0F, var14, var10.c());
         var9.a(2);
         var0.b(-var15, 0.0F);
      } else {
         var16 = new com.aspose.cells.b.a.b.zq(0.0F, -var10.c() / 2.0F, var14, var10.c());
         var9.a(0);
         var0.b(var15, 0.0F);
      }

      var16.d(var16.i() + 3.0F);
      var0.a(var1, var5, var8, (com.aspose.cells.b.a.b.zq)var16, var9);
      var0.d();
   }

   static void a(zig var0) throws Exception {
      if (!var0.B().E()) {
         boolean var1 = false;
         if (var0.G().D() == var0.G().s()) {
            var1 = true;
         }

         if (var0.p() < 0) {
            if (var1) {
               var0.e().j(3);
               var0.K().j(3);
               var0.e().d(false);
               var0.K().d(false);
            } else if (var0.e().I() == 1 || !var0.G().p()) {
               var0.e().j(3);
               var0.K().j(3);
            }
         }

      }
   }

   static com.aspose.cells.b.a.b.zs a(zn var0, zbp var1, ArrayList var2, com.aspose.cells.b.a.b.zp var3) {
      if (var1.I() != 3 && var2.size() != 0 && var1.e().p() >= 0) {
         zbtk var4 = var1.J();
         short var5 = 250;
         com.aspose.cells.b.a.b.zs var6 = zbsq.a(var1.e().ap(), "a", var4.d(), var4.a(), (com.aspose.cells.b.a.b.zs)var3.b(), 1, 1);
         var1.J().d(var6.b() * var1.J().c() / var5);
         com.aspose.cells.b.a.b.zt var7 = new com.aspose.cells.b.a.b.zt(0.0F, 0.0F);
         zig var8 = var1.e();
         int var9 = var2.size();
         com.aspose.cells.b.a.b.zo[] var10 = zic.d(var8);
         float var11 = 0.0F;
         if (var10[0].e() == var10[1].e()) {
            var7.a((float)(var3.e() / var9 * var1.H()));
            var7.b((float)var3.f() * 0.5F);
         } else {
            var11 = Math.abs(var10[1].e() - var10[0].e()) / (float)var2.size();
            var7.a((float)var3.e() * 0.5F);
            var7.b(var11 * (float)var1.H());
            if (var1.K()) {
               while(var7.c() < (float)var6.c() && var1.G().d() == 0 && var1.H() < var2.size()) {
                  var1.k(var1.H() + 1);
                  var7.b(var11 * (float)var1.H());
               }
            }
         }

         int var12 = 0;
         int var13 = 0;

         for(int var14 = 0; var14 < var2.size(); ++var14) {
            String var15 = "";
            var15 = a(var1, var1.l.get(var14));
            com.aspose.cells.b.a.b.zs var16 = zbsq.a(var0, var15, var4.d(), var4.a(), (com.aspose.cells.b.a.b.zt)var7, 1, 1);
            if (var16.b() > var12) {
               var12 = var16.b();
            }

            if (var16.c() > var13) {
               var13 = var16.c();
            }
         }

         var1.f = (float)var12;
         var1.g = (float)var13;
         return new com.aspose.cells.b.a.b.zs(var12, var13);
      } else {
         return new com.aspose.cells.b.a.b.zs(0, 0);
      }
   }

   static void a(zn var0, zbp var1) throws Exception {
      if (!var1.e().B().E()) {
         zig var2 = var1.e();
         int var3 = var2.N();
         zbvd var4 = var2.S();
         com.aspose.cells.b.a.b.zo var5 = zic.e(var2);
         var1.l().a(var5.d(), var5.e(), var5.d(), var5.e() - var4.i());
         zbtk var6 = var1.J();
         zbcq var7 = var2.z().c(0);
         zje var8 = var7.E().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var6.h() && var8 != null) {
            var11 = true;
         }

         float var12 = 0.0F;
         byte var13 = 8;
         if (var5.d() > var2.S().j()) {
            var13 = 7;
            var12 = var5.d();
            var12 += (float)var1.aa();
            var12 += (float)var1.ac();
         } else {
            var12 = var5.d() - var1.f;
            var12 -= (float)var1.aa();
            var12 -= (float)var1.ac();
         }

         ArrayList var14 = var1.l;
         double var15 = var1.n() ? var1.g(var1.z()) : var1.z();
         double var17 = var1.n() ? var1.g(var1.D()) : var1.D();
         double var19 = var1.n() ? var1.g(var1.x()) : var1.x();

         for(int var21 = 0; var21 < var1.l.size(); ++var21) {
            double var22 = (Double)var1.l.get(var21);
            double var24 = var1.n() ? var1.h(var22) : var22;
            if (var21 - 1 > 0) {
               if (Math.abs(zbuk.a(var19, Math.abs(zbuk.a(com.aspose.cells.b.a.ze.g(var14.get(var21)), com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))))) / var19 > b) {
                  continue;
               }
            } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var19, Math.abs(zbuk.a(com.aspose.cells.b.a.ze.g(var14.get(var21)), com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))))) / var19 > b) {
               continue;
            }

            float var26 = (float)((var22 - var17) / (var15 - var17) * (double)var2.S().i());
            if (!var1.p()) {
               var26 = var5.e() - var26;
            } else {
               var26 += var5.e() - var4.i();
            }

            if (var1.I() != 3) {
               if (zia.b(var3)) {
                  var24 /= 100.0D;
                  var9 = "0%";
               }

               String var27 = "";
               var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.T().f());
               Color var28 = var6.g();
               if (var11) {
                  var27 = zpw.a(var2.al(), var24, var9, var10);
                  var28 = zpw.a(var24, var9, var28);
               } else {
                  var27 = a((zbp)var1, (Object)var24);
                  var28 = zpw.a(var24, var6.b(), var28);
               }

               com.aspose.cells.b.a.b.zq var29 = new com.aspose.cells.b.a.b.zq(var12, var26 - var1.g / 2.0F, var1.f, var1.g);
               a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var6.d(), var6.a(), var28, var13, 1, com.aspose.cells.b.a.b.zv.c());
            }

            a(var0, var1, var5.d(), var26);
         }

         a(var0, var1, var5.d(), var5.e() - var4.i(), var5.e());
      }
   }

   private static void a(zn var0, zbp var1, float var2, float var3) {
      if (var1.E() != 2 && var1.l().g()) {
         zig var4 = var1.e();
         zbvd var5 = var4.S();
         boolean var6 = false;
         boolean var7 = false;
         switch(var1.E()) {
         case 0:
            var6 = true;
            var7 = true;
            break;
         case 1:
            var6 = true;
            if (var2 > var4.S().j()) {
               var6 = false;
               var7 = true;
            }
         case 2:
         default:
            break;
         case 3:
            var7 = true;
            if (var2 > var4.S().j()) {
               var7 = false;
               var6 = true;
            }
         }

         if (var6) {
            var1.l().a(var2, var3, var2 + (float)var1.aa(), var3);
         }

         if (var7) {
            var1.l().a(var2 - (float)var1.aa(), var3, var2, var3);
         }

      }
   }

   private static void a(zn var0, zbp var1, float var2, float var3, float var4) {
      if (var1.F() != 2 && var1.l().g()) {
         zig var5 = var1.e();
         zbvd var6 = var5.S();
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.F()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
            if (var2 > var5.S().j()) {
               var7 = false;
               var8 = true;
            }
         case 2:
         default:
            break;
         case 3:
            var8 = true;
            if (var2 > var5.S().j()) {
               var8 = false;
               var7 = true;
            }
         }

         float var10 = (float)(var1.B() / (var1.z() - var1.D()) * (double)(var4 - var3));
         float var9;
         if (!var1.p()) {
            var9 = var4;
            var10 = -var10;
         } else {
            var9 = var3;
         }

         float var11 = var9;

         do {
            if (var7) {
               var1.l().a(var2, var11, var2 + (float)var1.ab(), var11);
            }

            if (var8) {
               var1.l().a(var2 - (float)var1.ab(), var11, var2, var11);
            }

            var11 += var10;
         } while(var3 <= var11 && var11 <= var4);

      }
   }

   static void a(zn var0, zbp var1, int var2, com.aspose.cells.b.a.b.zp var3, boolean var4) throws Exception {
      if (!var1.e().B().E()) {
         if (var1.k() == 2) {
            d(var0, var1);
         } else {
            zig var5 = var1.e();
            zbvd var6 = var5.S();
            com.aspose.cells.b.a.b.zo[] var7 = zic.c(var5);
            zbp var8 = var5.G();
            double var9 = var8.V();
            double var11 = var8.W();
            double var13 = var8.X();
            boolean var15 = false;
            if (var8.D() == var8.s()) {
               var15 = true;
            }

            if (var8.p()) {
               var13 = var9 - var13;
            } else {
               var13 -= var11;
            }

            int var16 = (int)(var13 / (var9 - var11) * (double)var5.S().i());
            if (var16 != 0) {
               var1.l().a(var7[0].d(), var7[0].e() - (float)var16, var7[1].d(), var7[1].e() - (float)var16);
            }

            if (var5.p() >= 0) {
               var1.l().a(var7[0].d(), var7[0].e(), var7[1].d(), var7[1].e());
            }

            if (var1.I() == 2) {
               var7[0].b(var7[0].e() - (float)var16);
               var7[1].b(var7[1].e() - (float)var16);
            }

            zbcs var17 = var5.z();
            zbtk var18 = var1.J();
            ArrayList var19 = var5.z().c();
            float var20 = (float)var1.J().k();
            if (var1.I() != 3) {
               var20 += (float)(var1.aa() + var1.ab());
            }

            boolean var21 = var1.f() || var5.u();
            int var22;
            if (var21) {
               var22 = var2;
            } else {
               var22 = var2 - 1;
               if (var22 == 0) {
                  var22 = 1;
               }
            }

            double var23 = var7[1].d() == var7[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var7[0].e() - var7[1].e()) / (var7[1].d() - var7[0].d())));
            double var25 = 180.0D * var23 / 3.141592653589793D;
            float var27 = (var7[1].d() - var7[0].d()) / (float)var22;
            float var28 = (var7[1].e() - var7[0].e()) / (float)var22;
            com.aspose.cells.b.a.b.zo var29 = com.aspose.cells.b.a.b.zo.a();

            for(int var30 = 0; var30 < var2; ++var30) {
               int var31 = var30;
               if (var1.p()) {
                  var31 = var2 - 1 - var30;
               }

               String var32 = "";
               Color var33 = var18.g();
               boolean var35;
               if (var31 < var1.l.size()) {
                  var32 = a(var1, var1.l.get(var31));
                  var33 = zpw.a(var1.l.get(var31), var18.b(), var33);
                  if (var18.h() && var19.size() > 0) {
                     String var34 = "";
                     var35 = false;
                     var34 = var31 < var19.size() ? ((zfp)var19.get(var31)).c() : "";
                     var35 = var31 < var19.size() ? ((zfp)var19.get(var31)).b() : false;
                     var32 = zpw.a(var5.al(), var1.l.get(var31), var34, var35);
                     var33 = zpw.a(var1.l.get(var31), var34, var33);
                  }
               }

               if (var1.I() != 3 && var31 % var1.H() == 0) {
                  com.aspose.cells.b.a.b.zq var46 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, 0.0F, 0.0F);
                  var35 = false;
                  if (var21) {
                     if (var5.p() >= 0) {
                        if (var7[0].e() == var7[1].e()) {
                           var46.a(var27 < 0.0F ? var7[0].d() + (float)(var30 + 1) * var27 : var7[0].d() + (float)var30 * var27);
                           var46.b(var7[0].e() + var20);
                           var46.c(Math.abs(var27 * (float)var1.H()));
                           var46.d(var1.h);
                           var35 = true;
                           var29.a(var27 < 0.0F ? var46.f() - var27 / 2.0F : var46.f() + var27 * (float)var1.H() / 2.0F);
                           var29.b(var46.g());
                        } else if (var23 <= 0.7853981633974483D) {
                           var46.a(var27 < 0.0F ? var7[0].d() + (float)(var30 + 1) * var27 : var7[0].d() + (float)var30 * var27);
                           var46.b(var28 > 0.0F ? var7[0].e() + (float)(var30 + 1) * var28 : var7[0].e() + (float)var30 * var28);
                           var46.c(Math.abs(var27));
                           var46.d(var1.h);
                        } else {
                           var46.a(var28 > 0.0F ? var7[0].d() + (float)var30 * var27 : var7[0].d() + (float)(var30 + 1) * var27);
                           var46.a(var27 * var28 <= 0.0F ? var46.f() + var20 * (float)Math.sin(var23) : var46.f() - var20 * (float)Math.sin(var23) - var1.i);
                           var46.b(var28 > 0.0F ? var7[0].e() + (float)var30 * var28 : var7[0].e() + (float)(var30 + 1) * var28);
                           var46.b(var46.g() + (Math.abs(var28) - var1.h) * (float)Math.sin(var23) / 2.0F);
                           var46.c(var1.i);
                           var46.d(var1.h);
                        }
                     } else if (var5.p() < 0 && !var15 && var1.I() == 2) {
                        if (var7[0].e() == var7[1].e()) {
                           var46.a(var27 > 0.0F ? var7[0].d() + (float)var30 * var27 : var7[0].d() + (float)(var30 + 1) * var27);
                           var46.b(var7[0].e() - var1.h - var20);
                           var46.c(Math.abs(var27));
                           var46.d(var1.h);
                        } else if (var23 <= 0.7853981633974483D) {
                           var46.a(var27 < 0.0F ? var7[0].d() + (float)(var30 + 1) * var27 : var7[0].d() + (float)var30 * var27);
                           var46.b(var28 < 0.0F ? var7[0].e() + (float)(var30 + 1) * var28 : var7[0].e() + (float)var30 * var28);
                           var46.b(var46.g() - var1.h);
                           var46.c(Math.abs(var27));
                           var46.d(var1.h);
                        } else {
                           var46.a(var28 < 0.0F ? var7[0].d() + (float)var30 * var27 : var7[0].d() + (float)(var30 + 1) * var27);
                           var46.a(var27 * var28 >= 0.0F ? var46.f() + var20 * (float)Math.sin(var23) : var46.f() - var20 * (float)Math.sin(var23) - var1.i);
                           var46.b(var28 < 0.0F ? var7[0].e() + (float)var30 * var28 : var7[0].e() + (float)(var30 + 1) * var28);
                           var46.b(var46.g() - (Math.abs(var28) - var1.h) * (float)Math.sin(var23) / 2.0F);
                           var46.b(var46.g() - var1.h);
                           var46.c(var1.i);
                           var46.d(var1.h);
                        }
                     }
                  } else if (var5.p() >= 0) {
                     if (var7[0].e() == var7[1].e()) {
                        var46.a(var27 < 0.0F ? var7[0].d() + (float)var30 * var27 + var27 / 2.0F : var7[0].d() + (float)var30 * var27 - var27 / 2.0F);
                        var46.b(var7[0].e() + var20);
                        var46.c(Math.abs(var27));
                        var46.d(var1.h);
                     } else if (var23 <= 0.7853981633974483D) {
                        var46.a(var7[0].d() + (float)var30 * var27 - Math.abs(var27) / 2.0F);
                        var46.b(var7[0].e() + (float)var30 * var28 + var20);
                        var46.c(Math.abs(var27));
                        var46.d(var1.h);
                     } else {
                        var46.a(var7[0].d() + (float)var30 * var27);
                        var46.a(var27 * var28 <= 0.0F ? var46.f() + var20 * (float)Math.sin(var23) : var46.f() - var20 * (float)Math.sin(var23) - var1.i);
                        var46.b(var7[0].e() + (float)var30 * var28 - var1.h / 2.0F);
                        var46.c(var1.i);
                        var46.d(var1.h);
                     }
                  } else if (var5.p() < 0 && !var15 && var1.I() == 2) {
                     if (var7[0].e() == var7[1].e()) {
                        var46.a(var27 > 0.0F ? var7[0].d() + (float)var30 * var27 - var27 / 2.0F : var7[0].d() + (float)var30 * var27 + var27 / 2.0F);
                        var46.b(var7[0].e() - var1.h - var20);
                        var46.c(Math.abs(var27));
                        var46.d(var1.h);
                     } else if (var23 <= 0.7853981633974483D) {
                        var46.a(var7[0].d() + (float)var30 * var27 - Math.abs(var27) / 2.0F);
                        var46.b(var7[0].e() + (float)var30 * var28);
                        var46.b(var46.g() - (var1.h + var20));
                        var46.c(Math.abs(var27));
                        var46.d(var1.h);
                     } else {
                        var46.a(var28 < 0.0F ? var7[0].d() + (float)var30 * var27 : var7[0].d() + (float)var30 * var27);
                        var46.a(var27 * var28 >= 0.0F ? var46.f() + var20 * (float)Math.sin(var23) : var46.f() - var20 * (float)Math.sin(var23) - var1.i);
                        var46.b(var7[0].e() + (float)var30 * var28 - var1.h / 2.0F);
                        var46.c(var1.i);
                        var46.d(var1.h);
                     }
                  }

                  if (var18.d() != 0 && var18.d() != 90 && var18.d() != -90 && var35) {
                     a(var0, var32, var29, new com.aspose.cells.b.a.b.zt(var1.i, var1.h), var18.d(), var18.a(), var33, var1.a());
                  } else {
                     com.aspose.cells.b.a.b.zs var36 = zbsq.a(var0, var32, var18.d(), var18.a(), (com.aspose.cells.b.a.b.zt)var46.e(), 1, 1);
                     zbuk.a(var0, var32, var18.a(), new com.aspose.cells.b.a.b.zt(var46.i(), var46.h()));
                     var46.d((float)var36.c());
                     a(var0, com.aspose.cells.b.a.b.zp.a(var46), var32, var18.d(), var18.a(), var33, 1, 1, com.aspose.cells.b.a.b.zv.c());
                  }
               }
            }

            a(var0, var1, var16, var2);
            ArrayList[] var42 = var5.z().e();
            boolean var43 = var5.G().p();
            float var44 = var7[0].e();
            byte var45 = 9;
            if (var42 != null && var42.length > 0 && var19.size() > 0 && var1.I() != 3) {
               ArrayList var47 = var42[0];
               zfp var49 = (zfp)var47.get(0);
               String var48 = zpw.a(var5.al(), var49.a(), var49.c(), var49.b());
               zbsq.a(var1.e().ap(), var48, 0, var18.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var3.e(), (float)var3.f())), 1, 1);
               float var38;
               if (!var1.p()) {
                  var38 = var7[0].d();
               } else {
                  var38 = var7[1].d();
               }

               float var39 = var44 + var20 * (float)(var42.length + 1) + var1.g;
               boolean var41 = false;
               if (var7[0].e() == var7[1].e()) {
                  a(var0, var42, var38, var39, var20, var41, var1, (double)var27, var18, var45, var44, var3, var4);
               }
            }

         }
      }
   }

   private static void d(zn var0, zbp var1) {
      zig var2 = var1.e();
      zbvd var3 = var2.S();
      com.aspose.cells.b.a.b.zo[] var4 = zic.c(var2);
      double var5;
      if (var2.G().p()) {
         var5 = var2.G().z() - var2.G().s();
      } else {
         var5 = var2.G().s() - var2.G().D();
      }

      int var7 = (int)(var5 / (var2.G().z() - var2.G().D()) * (double)var2.S().i());
      if (var7 != 0) {
         var1.l().a(var4[0].d(), var4[0].e() - (float)var7, var4[1].d(), var4[1].e() - (float)var7);
      }

      if (var2.p() >= 0) {
         var1.l().a(var4[0].d(), var4[0].e(), var4[1].d(), var4[1].e());
      }

      if (var1.I() == 2) {
         var4[0].b(var4[0].e() - (float)var7);
         var4[1].b(var4[1].e() - (float)var7);
      }

      zbcs var8 = var2.z();
      zbtk var9 = var1.J();
      ArrayList var10 = var2.z().c();
      float var11 = (float)var1.J().k();
      if (var1.I() != 3) {
         var11 += (float)(var1.aa() + var1.ab());
      }

      double var12 = var4[1].d() == var4[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var4[0].e() - var4[1].e()) / (var4[1].d() - var4[0].d())));
      double var14 = 180.0D * var12 / 3.141592653589793D;
      int var16 = (int)var1.z();
      int var17 = (int)var1.D();
      int var18 = var1.j();
      boolean var19 = var1.f() || var2.u();
      int var20;
      if (var19) {
         var20 = a(var18, var16, var17, var1.e().X()) + 1;
      } else {
         var20 = a(var18, var16, var17, var1.e().X());
         if (var20 == 0) {
            var20 = 1;
         }
      }

      float var21 = (var4[1].d() - var4[0].d()) / (float)var20;
      float var22 = (var4[1].e() - var4[0].e()) / (float)var20;
      ArrayList var23 = var1.l;

      for(int var24 = 0; var24 < var23.size(); ++var24) {
         int var25 = var24;
         if (var1.p()) {
            var25 = var23.size() - 1 - var24;
         }

         int var26 = com.aspose.cells.b.a.ze.f(var1.l.get(var24));
         int var27 = a(var18, var26, var17, var1.e().X());
         float var10000 = var22 * (float)var27;
         String var29 = "";
         Color var30 = var9.g();
         if (var25 < var1.l.size()) {
            var29 = a(var1, var1.l.get(var25));
            var30 = zpw.a(var1.l.get(var25), var9.b(), var30);
            if (var9.h() && var10.size() > 0) {
               String var31 = "";
               boolean var32 = false;
               var31 = ((zfp)var10.get(0)).c();
               var32 = ((zfp)var10.get(0)).b();
               var29 = zpw.a(var2.al(), var1.l.get(var25), var31, var32);
               var30 = zpw.a(var1.l.get(var25), var31, var30);
            }
         }

         if (var1.I() != 3) {
            com.aspose.cells.b.a.b.zq var33 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, 0.0F, 0.0F);
            if (var19) {
               if (var2.p() >= 0) {
                  if (var4[0].e() == var4[1].e()) {
                     var33.a(var21 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var21 : var4[0].d() + (float)var24 * var21);
                     var33.b(var4[0].e() + var11);
                     var33.c(Math.abs(var21));
                     var33.d(var1.g);
                  } else if (var12 <= 0.7853981633974483D) {
                     var33.a(var21 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var21 : var4[0].d() + (float)var24 * var21);
                     var33.b(var22 > 0.0F ? var4[0].e() + (float)(var24 + 1) * var22 : var4[0].e() + (float)var24 * var22);
                     var33.c(var1.f);
                     var33.d(var1.g);
                  } else {
                     var33.a(var22 > 0.0F ? var4[0].d() + (float)var24 * var21 : var4[0].d() + (float)(var24 + 1) * var21);
                     var33.a(var21 * var22 <= 0.0F ? var33.f() + var11 * (float)Math.sin(var12) : var33.f() - var11 * (float)Math.sin(var12) - var1.f);
                     var33.b(var22 > 0.0F ? var4[0].e() + (float)var24 * var22 : var4[0].e() + (float)(var24 + 1) * var22);
                     var33.b(var33.g() + (Math.abs(var22) - var1.g) * (float)Math.sin(var12) / 2.0F);
                     var33.c(var1.f);
                     var33.d(var1.g);
                  }
               } else if (var2.p() < 0 && var5 != 0.0D && var1.I() == 2) {
                  if (var4[0].e() == var4[1].e()) {
                     var33.a(var21 > 0.0F ? var4[0].d() + (float)var24 * var21 : var4[0].d() + (float)(var24 + 1) * var21);
                     var33.b(var4[0].e() - var1.g - var11);
                     var33.c(var1.f);
                     var33.d(var1.g);
                  } else if (var12 <= 0.7853981633974483D) {
                     var33.a(var21 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var21 : var4[0].d() + (float)var24 * var21);
                     var33.b(var22 < 0.0F ? var4[0].e() + (float)(var24 + 1) * var22 : var4[0].e() + (float)var24 * var22);
                     var33.b(var33.g() - var1.g);
                     var33.c(var1.f);
                     var33.d(var1.g);
                  } else {
                     var33.a(var22 < 0.0F ? var4[0].d() + (float)var24 * var21 : var4[0].d() + (float)(var24 + 1) * var21);
                     var33.a(var21 * var22 >= 0.0F ? var33.f() + var11 * (float)Math.sin(var12) : var33.f() - var11 * (float)Math.sin(var12) - var1.f);
                     var33.b(var22 < 0.0F ? var4[0].e() + (float)var24 * var22 : var4[0].e() + (float)(var24 + 1) * var22);
                     var33.b(var33.g() - (Math.abs(var22) - var1.g) * (float)Math.sin(var12) / 2.0F);
                     var33.b(var33.g() - var1.g);
                     var33.c(var1.f);
                     var33.d(var1.g);
                  }
               }
            } else if (var2.p() >= 0) {
               if (var4[0].e() == var4[1].e()) {
                  var33.a(var21 < 0.0F ? var4[0].d() + (float)var24 * var21 + var21 / 2.0F : var4[0].d() + (float)var24 * var21 - var21 / 2.0F);
                  var33.b(var4[0].e() + var11);
                  var33.c(Math.abs(var21));
                  var33.d(var1.g);
               } else if (var12 <= 0.7853981633974483D) {
                  var33.a(var4[0].d() + (float)var24 * var21 - Math.abs(var21) / 2.0F);
                  var33.b(var4[0].e() + (float)var24 * var22 + var11);
                  var33.c(Math.abs(var21));
                  var33.d(var1.g);
               } else {
                  var33.a(var4[0].d() + (float)var24 * var21);
                  var33.a(var21 * var22 <= 0.0F ? var33.f() + var11 * (float)Math.sin(var12) : var33.f() - var11 * (float)Math.sin(var12) - var1.f);
                  var33.b(var4[0].e() + (float)var24 * var22 - var1.g / 2.0F);
                  var33.c(var1.f);
                  var33.d(var1.g);
               }
            } else if (var2.p() < 0 && var5 != 0.0D && var1.I() == 2) {
               if (var4[0].e() == var4[1].e()) {
                  var33.a(var21 > 0.0F ? var4[0].d() + (float)var24 * var21 - var21 / 2.0F : var4[0].d() + (float)var24 * var21 + var21 / 2.0F);
                  var33.b(var4[0].e() - var1.g - var11);
                  var33.c(Math.abs(var21));
                  var33.d(var1.g);
               } else if (var12 <= 0.7853981633974483D) {
                  var33.a(var4[0].d() + (float)var24 * var21 - Math.abs(var21) / 2.0F);
                  var33.b(var4[0].e() + (float)var24 * var22);
                  var33.b(var33.g() - (var1.g + var11));
                  var33.c(Math.abs(var21));
                  var33.d(var1.g);
               } else {
                  var33.a(var22 < 0.0F ? var4[0].d() + (float)var24 * var21 : var4[0].d() + (float)var24 * var21);
                  var33.a(var21 * var22 >= 0.0F ? var33.f() + var11 * (float)Math.sin(var12) : var33.f() - var11 * (float)Math.sin(var12) - var1.f);
                  var33.b(var4[0].e() + (float)var24 * var22 - var1.g / 2.0F);
                  var33.c(var1.f);
                  var33.d(var1.g);
               }
            }

            a(var0, com.aspose.cells.b.a.b.zp.a(var33), var29, var9.d(), var9.a(), var30, 1, 1);
         }
      }

      a(var0, var1, var7);
   }

   private static void a(zn var0, zbp var1, int var2, int var3) {
      zig var4 = var1.e();
      zbvd var5 = var4.S();
      if ((var1.E() != 2 || var1.F() != 2) && var1.l().g()) {
         boolean var6 = var1.f() || var1.e().u();
         com.aspose.cells.b.a.b.zo[] var7;
         if (var1.g() == 4) {
            var7 = zic.d(var4);
            var6 = true;
         } else {
            var7 = zic.c(var4);
         }

         double var8 = var7[1].d() == var7[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var7[0].e() - var7[1].e()) / (var7[1].d() - var7[0].d())));
         int var14;
         if (var6) {
            var14 = var3;
         } else {
            var14 = var3 - 1;
            if (var14 == 0) {
               var14 = 1;
            }
         }

         if (var4.p() < 0 && var2 > 0) {
            var7[0].b(var7[0].e() - (float)var2);
            var7[1].b(var7[1].e() - (float)var2);
            var2 = 0;
         }

         while(true) {
            float var10;
            float var11;
            com.aspose.cells.b.a.b.zo var12;
            com.aspose.cells.b.a.b.zo var13;
            boolean var15;
            boolean var16;
            float var17;
            float var18;
            boolean var19;
            boolean var20;
            if (var8 <= 0.7853981633974483D) {
               var15 = false;
               var16 = false;
               switch(var1.E()) {
               case 0:
                  var15 = true;
                  var16 = true;
                  break;
               case 1:
                  if (var4.p() >= 0) {
                     var15 = true;
                  } else {
                     var16 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var4.p() >= 0) {
                     var16 = true;
                  } else {
                     var15 = true;
                  }
               }

               if (!var1.p()) {
                  var12 = var7[0];
                  var13 = var7[1];
               } else {
                  var12 = var7[1];
                  var13 = var7[0];
               }

               var10 = (var13.d() - var12.d()) / (float)var14;
               var11 = (var13.e() - var12.e()) / (float)var14;
               if (var10 == 0.0F && var11 == 0.0F) {
                  return;
               }

               var17 = var12.d();
               var18 = var12.e();

               label250:
               while(true) {
                  if ((var12.d() > var17 || var17 > var13.d()) && (var12.d() < var17 || var17 < var13.d()) && com.aspose.cells.b.a.zq.a((double)var17) != com.aspose.cells.b.a.zq.a((double)var12.d()) && com.aspose.cells.b.a.zq.a((double)var17) != com.aspose.cells.b.a.zq.a((double)var13.d())) {
                     var19 = false;
                     var20 = false;
                     switch(var1.F()) {
                     case 0:
                        var19 = true;
                        var20 = true;
                        break;
                     case 1:
                        if (var4.p() >= 0) {
                           var19 = true;
                        } else {
                           var20 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var4.p() >= 0) {
                           var20 = true;
                        } else {
                           var19 = true;
                        }
                     }

                     var17 = var12.d() + (float)var1.Q() * var10 / 2.0F;
                     var18 = var12.e() + (float)var1.Q() * var11 / 2.0F;

                     while(true) {
                        if ((var12.d() > var17 || var17 > var13.d()) && (var12.d() < var17 || var17 < var13.d()) && com.aspose.cells.b.a.zq.a((double)var17) != com.aspose.cells.b.a.zq.a((double)var12.d()) && com.aspose.cells.b.a.zq.a((double)var17) != com.aspose.cells.b.a.zq.a((double)var13.d())) {
                           break label250;
                        }

                        if (var19) {
                           var1.l().a(var17, var18 - (float)var1.ab(), var17, var18);
                        }

                        if (var20) {
                           var1.l().a(var17, var18, var17, var18 + (float)var1.ab());
                        }

                        if (var1.E() == 2) {
                           var17 += (float)var1.Q() * var10 / 2.0F;
                           var18 += (float)var1.Q() * var11 / 2.0F;
                           if (var12.e() <= var18 && var18 <= var13.e() || var12.e() >= var18 && var18 >= var13.e() || com.aspose.cells.b.a.zq.a((double)var18) == com.aspose.cells.b.a.zq.a((double)var12.e()) || com.aspose.cells.b.a.zq.a((double)var18) == com.aspose.cells.b.a.zq.a((double)var13.e())) {
                              if (var19) {
                                 var1.l().a(var17, var18 - (float)var1.ab(), var17, var18);
                              }

                              if (var20) {
                                 var1.l().a(var17, var18, var17, var18 + (float)var1.ab());
                              }
                           }

                           var17 -= (float)var1.Q() * var10 / 2.0F;
                           var18 -= (float)var1.Q() * var11 / 2.0F;
                        }

                        var17 += (float)var1.Q() * var10;
                        var18 += (float)var1.Q() * var11;
                     }
                  }

                  if (var15) {
                     var1.l().a(var17, var18 - (float)var1.aa(), var17, var18);
                  }

                  if (var16) {
                     var1.l().a(var17, var18, var17, var18 + (float)var1.aa());
                  }

                  var17 += (float)var1.Q() * var10;
                  var18 += (float)var1.Q() * var11;
               }
            } else {
               var15 = false;
               var16 = false;
               switch(var1.E()) {
               case 0:
                  var15 = true;
                  var16 = true;
                  break;
               case 1:
                  if (var4.E() >= 90 && (var4.E() < 225 || var4.E() >= 270)) {
                     var16 = true;
                  } else {
                     var15 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var4.E() >= 90 && (var4.E() < 225 || var4.E() >= 270)) {
                     var15 = true;
                  } else {
                     var16 = true;
                  }
               }

               if (!var1.p()) {
                  var12 = var7[0];
                  var13 = var7[1];
               } else {
                  var12 = var7[1];
                  var13 = var7[0];
               }

               var10 = (var13.d() - var12.d()) / (float)var14;
               var11 = (var13.e() - var12.e()) / (float)var14;
               if (var10 == 0.0F && var11 == 0.0F) {
                  return;
               }

               var17 = var12.d();
               var18 = var12.e();

               label315:
               while(true) {
                  if ((var12.e() > var18 || var18 > var13.e()) && (var12.e() < var18 || var18 < var13.e()) && com.aspose.cells.b.a.zq.a((double)var18) != com.aspose.cells.b.a.zq.a((double)var12.e()) && com.aspose.cells.b.a.zq.a((double)var18) != com.aspose.cells.b.a.zq.a((double)var13.e())) {
                     var19 = false;
                     var20 = false;
                     switch(var1.F()) {
                     case 0:
                        var19 = true;
                        var20 = true;
                        break;
                     case 1:
                        if (var4.E() >= 90 && (var4.E() < 225 || var4.E() >= 270)) {
                           var20 = true;
                        } else {
                           var19 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var4.E() >= 90 && (var4.E() < 225 || var4.E() >= 270)) {
                           var19 = true;
                        } else {
                           var20 = true;
                        }
                     }

                     var17 = var12.d() + (float)var1.Q() * var10 / 2.0F;
                     var18 = var12.e() + (float)var1.Q() * var11 / 2.0F;

                     while(true) {
                        if ((var12.e() > var18 || var18 > var13.e()) && (var12.e() < var18 || var18 < var13.e()) && com.aspose.cells.b.a.zq.a((double)var18) != com.aspose.cells.b.a.zq.a((double)var12.e()) && com.aspose.cells.b.a.zq.a((double)var18) != com.aspose.cells.b.a.zq.a((double)var13.e())) {
                           break label315;
                        }

                        if (var19) {
                           var1.l().a(var17, var18, var17 + (float)var1.ab(), var18);
                        }

                        if (var20) {
                           var1.l().a(var17 - (float)var1.ab(), var18, var17, var18);
                        }

                        if (var1.E() == 2) {
                           var17 += (float)var1.Q() * var10 / 2.0F;
                           var18 += (float)var1.Q() * var11 / 2.0F;
                           if (var12.e() <= var18 && var18 <= var13.e() || var12.e() >= var18 && var18 >= var13.e() || com.aspose.cells.b.a.zq.a((double)var18) == com.aspose.cells.b.a.zq.a((double)var12.e()) || com.aspose.cells.b.a.zq.a((double)var18) == com.aspose.cells.b.a.zq.a((double)var13.e())) {
                              if (var19) {
                                 var1.l().a(var17, var18, var17 + (float)var1.ab(), var18);
                              }

                              if (var20) {
                                 var1.l().a(var17 - (float)var1.ab(), var18, var17, var18);
                              }
                           }

                           var17 -= (float)var1.Q() * var10 / 2.0F;
                           var18 -= (float)var1.Q() * var11 / 2.0F;
                        }

                        var17 += (float)var1.Q() * var10;
                        var18 += (float)var1.Q() * var11;
                     }
                  }

                  if (var15) {
                     var1.l().a(var17, var18, var17 + (float)var1.aa(), var18);
                  }

                  if (var16) {
                     var1.l().a(var17 - (float)var1.aa(), var18, var17, var18);
                  }

                  var17 += (float)var1.Q() * var10;
                  var18 += (float)var1.Q() * var11;
               }
            }

            if (var2 <= 0) {
               return;
            }

            var7[0].b(var7[0].e() - (float)var2);
            var7[1].b(var7[1].e() - (float)var2);
            var2 = 0;
         }
      }
   }

   private static void a(zn var0, zbp var1, int var2) {
      zig var3 = var1.e();
      zbvd var4 = var3.S();
      if ((var1.E() != 2 || var1.F() != 2) && var1.l().g()) {
         com.aspose.cells.b.a.b.zo[] var5 = zic.c(var3);
         double var6 = var5[1].d() == var5[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var5[0].e() - var5[1].e()) / (var5[1].d() - var5[0].d())));
         int var12 = (int)var1.z();
         int var13 = (int)var1.D();
         int var14 = var1.j();
         boolean var15 = var1.f() || var3.u();
         int var16;
         if (var15) {
            var16 = a(var14, var12, var13, var1.e().X()) + 1;
         } else {
            var16 = a(var14, var12, var13, var1.e().X());
            if (var16 == 0) {
               var16 = 1;
            }
         }

         if (var3.p() < 0 && var2 > 0) {
            var5[0].b(var5[0].e() - (float)var2);
            var5[1].b(var5[1].e() - (float)var2);
            var2 = 0;
         }

         while(true) {
            float var8;
            float var9;
            com.aspose.cells.b.a.b.zo var10;
            com.aspose.cells.b.a.b.zo var11;
            boolean var17;
            boolean var18;
            float var19;
            float var20;
            boolean var21;
            boolean var22;
            if (var6 <= 0.7853981633974483D) {
               var17 = false;
               var18 = false;
               switch(var1.E()) {
               case 0:
                  var17 = true;
                  var18 = true;
                  break;
               case 1:
                  if (var3.p() >= 0) {
                     var17 = true;
                  } else {
                     var18 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var3.p() >= 0) {
                     var18 = true;
                  } else {
                     var17 = true;
                  }
               }

               if (!var1.p()) {
                  var10 = var5[0];
                  var11 = var5[1];
               } else {
                  var10 = var5[1];
                  var11 = var5[0];
               }

               var8 = (var11.d() - var10.d()) / (float)var16;
               var9 = (var11.e() - var10.e()) / (float)var16;
               var19 = var10.d();
               var20 = var10.e();

               label186:
               while(true) {
                  if ((var10.d() > var19 || var19 > var11.d()) && (var10.d() < var19 || var19 < var11.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var10.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var11.d())) {
                     var21 = false;
                     var22 = false;
                     switch(var1.F()) {
                     case 0:
                        var21 = true;
                        var22 = true;
                        break;
                     case 1:
                        if (var3.p() >= 0) {
                           var21 = true;
                        } else {
                           var22 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var3.p() >= 0) {
                           var22 = true;
                        } else {
                           var21 = true;
                        }
                     }

                     var19 = var10.d();
                     var20 = var10.e();

                     while(true) {
                        if ((var10.d() > var19 || var19 > var11.d()) && (var10.d() < var19 || var19 < var11.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var10.d()) && com.aspose.cells.b.a.zq.a((double)var19) != com.aspose.cells.b.a.zq.a((double)var11.d())) {
                           break label186;
                        }

                        if (var21) {
                           var1.l().a(var19, var20 - (float)var1.ab(), var19, var20);
                        }

                        if (var22) {
                           var1.l().a(var19, var20, var19, var20 + (float)var1.ab());
                        }

                        var19 += var8 * (float)a(var14, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
                        var20 += var9 * (float)a(var14, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
                     }
                  }

                  if (var17) {
                     var1.l().a(var19, var20 - (float)var1.aa(), var19, var20);
                  }

                  if (var18) {
                     var1.l().a(var19, var20, var19, var20 + (float)var1.aa());
                  }

                  var19 += var8 * (float)a(var14, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
                  var20 += var9 * (float)a(var14, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
               }
            } else {
               var17 = false;
               var18 = false;
               switch(var1.E()) {
               case 0:
                  var17 = true;
                  var18 = true;
                  break;
               case 1:
                  if (var3.E() >= 90 && (var3.E() < 225 || var3.E() >= 270)) {
                     var18 = true;
                  } else {
                     var17 = true;
                  }
               case 2:
               default:
                  break;
               case 3:
                  if (var3.E() >= 90 && (var3.E() < 225 || var3.E() >= 270)) {
                     var17 = true;
                  } else {
                     var18 = true;
                  }
               }

               if (!var1.p()) {
                  var10 = var5[0];
                  var11 = var5[1];
               } else {
                  var10 = var5[1];
                  var11 = var5[0];
               }

               var8 = (var11.d() - var10.d()) / (float)var16;
               var9 = (var11.e() - var10.e()) / (float)var16;
               var19 = var10.d();
               var20 = var10.e();

               label229:
               while(true) {
                  if ((var10.e() > var20 || var20 > var11.e()) && (var10.e() < var20 || var20 < var11.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var10.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var11.e())) {
                     var21 = false;
                     var22 = false;
                     switch(var1.F()) {
                     case 0:
                        var21 = true;
                        var22 = true;
                        break;
                     case 1:
                        if (var3.E() < 90 || var3.E() >= 225 && var3.E() < 270) {
                           var21 = true;
                        } else {
                           var22 = true;
                        }
                     case 2:
                     default:
                        break;
                     case 3:
                        if (var3.E() >= 90 && (var3.E() < 225 || var3.E() >= 270)) {
                           var21 = true;
                        } else {
                           var22 = true;
                        }
                     }

                     var19 = var10.d();
                     var20 = var10.e();

                     while(true) {
                        if ((var10.e() > var20 || var20 > var11.e()) && (var10.e() < var20 || var20 < var11.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var10.e()) && com.aspose.cells.b.a.zq.a((double)var20) != com.aspose.cells.b.a.zq.a((double)var11.e())) {
                           break label229;
                        }

                        if (var21) {
                           var1.l().a(var19, var20, var19 + (float)var1.ab(), var20);
                        }

                        if (var22) {
                           var1.l().a(var19 - (float)var1.ab(), var20, var19, var20);
                        }

                        boolean var23 = var1.e().X();
                        var19 += var8 * (float)a(var14, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var23), (int)var1.D(), var23);
                        var20 += var9 * (float)a(var14, a(var1.j(), var1.C(), (int)var1.B(), (int)var1.D(), var23), (int)var1.D(), var23);
                     }
                  }

                  if (var17) {
                     var1.l().a(var19, var20, var19 + (float)var1.aa(), var20);
                  }

                  if (var18) {
                     var1.l().a(var19 - (float)var1.aa(), var20, var19, var20);
                  }

                  var19 += var8 * (float)a(var14, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
                  var20 += var9 * (float)a(var14, a(var1.j(), var1.y(), (int)var1.x(), (int)var1.D(), var1.e().X()), (int)var1.D(), var1.e().X());
               }
            }

            if (var2 <= 0) {
               return;
            }

            var5[0].b(var5[0].e() - (float)var2);
            var5[1].b(var5[1].e() - (float)var2);
            var2 = 0;
         }
      }
   }

   static void b(zn var0, zbp var1) throws Exception {
      if (!var1.e().B().E()) {
         zig var2 = var1.e();
         int var3 = var2.N();
         zbvd var4 = var2.S();
         com.aspose.cells.b.a.b.zo[] var5 = zic.c(var2);
         var1.l().a(var5[0], var5[1]);
         zbtk var6 = var1.J();
         zbcq var7 = var2.z().c(0);
         zje var8 = var7.E().b(0);
         String var9 = var8.z();
         boolean var10 = var8.A();
         boolean var11 = false;
         if (var6.h() && var8 != null) {
            var11 = true;
         }

         float var12 = 0.0F;
         var12 = var5[0].e() + (float)var1.aa();
         float var13 = (float)((double)var2.S().g() / (var1.z() - var1.D()));
         ArrayList var14 = var1.l;
         double var15 = var1.n() ? var1.g(var1.z()) : var1.z();
         double var17 = var1.n() ? var1.g(var1.D()) : var1.D();
         double var19 = var1.n() ? var1.g(var1.x()) : var1.x();

         for(int var21 = 0; var21 < var1.l.size(); ++var21) {
            double var22 = (Double)var1.l.get(var21);
            double var24 = var1.n() ? var1.h(var22) : var22;
            if (var21 - 1 > 0) {
               if (Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 - 1)))) != var19) {
                  continue;
               }
            } else if (var21 + 1 < var14.size() && Math.abs(zbuk.a(var22, com.aspose.cells.b.a.ze.g(var14.get(var21 + 1)))) != var19) {
               continue;
            }

            float var26 = (float)((var22 - var17) / (var15 - var17) * (double)var2.S().g());
            if (!var1.p()) {
               var26 += var5[0].d();
            } else {
               var26 = var5[1].d() - var26;
            }

            if (var1.I() != 3) {
               if (zia.b(var3)) {
                  var24 /= 100.0D;
                  var9 = "0%";
               }

               String var27 = "";
               var24 = var1.n() ? var24 : var24 * Math.pow(10.0D, var1.T().f());
               Color var28 = var6.g();
               if (var11) {
                  var27 = zpw.a(var2.al(), var24, var9, var10);
                  var28 = zpw.a(var24, var9, var28);
               } else {
                  var27 = a((zbp)var1, (Object)var24);
                  var28 = zpw.a(var24, var6.b(), var28);
               }

               com.aspose.cells.b.a.b.zq var29 = new com.aspose.cells.b.a.b.zq(var26 - var1.f / 2.0F, var12, var1.f, var1.g);
               a(var0, com.aspose.cells.b.a.b.zp.a(var29), var27, var6.d(), var6.a(), var28, 1, 9);
            }
         }

         e(var0, var1);
      }
   }

   private static void e(zn var0, zbp var1) {
      zig var2 = var1.e();
      zbvd var3 = var2.S();
      if ((var1.E() != 2 || var1.F() != 2) && var1.l().g()) {
         com.aspose.cells.b.a.b.zo[] var4 = zic.c(var2);
         boolean var7 = false;
         boolean var8 = false;
         switch(var1.E()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
         case 2:
         default:
            break;
         case 3:
            var8 = true;
         }

         com.aspose.cells.b.a.b.zo var5;
         com.aspose.cells.b.a.b.zo var6;
         if (!var1.p()) {
            var5 = var4[0];
            var6 = var4[1];
         } else {
            var5 = var4[1];
            var6 = var4[0];
         }

         float var9 = (float)((double)(var6.d() - var5.d()) / (var1.z() - var1.D()));
         float var10 = var5.d();

         float var11;
         for(var11 = var5.e(); var5.d() <= var10 && var10 <= var6.d() || var5.d() >= var10 && var10 >= var6.d() || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var5.d()) || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var6.d()); var10 += var9 * (float)var1.x()) {
            if (var7) {
               var1.l().a(var10, var11 - (float)var1.aa(), var10, var11);
            }

            if (var8) {
               var1.l().a(var10, var11, var10, var11 + (float)var1.aa());
            }
         }

         var7 = false;
         var8 = false;
         switch(var1.F()) {
         case 0:
            var7 = true;
            var8 = true;
            break;
         case 1:
            var7 = true;
         case 2:
         default:
            break;
         case 3:
            var8 = true;
         }

         var10 = var5.d();

         for(var11 = var5.e(); var5.d() <= var10 && var10 <= var6.d() || var5.d() >= var10 && var10 >= var6.d() || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var5.d()) || com.aspose.cells.b.a.zq.a((double)var10) == com.aspose.cells.b.a.zq.a((double)var6.d()); var10 += var9 * (float)var1.B()) {
            if (var7) {
               var1.l().a(var10, var11 - (float)var1.ab(), var10, var11);
            }

            if (var8) {
               var1.l().a(var10, var11, var10, var11 + (float)var1.ab());
            }
         }

      }
   }

   static void a(zn var0, zbp var1, int var2, com.aspose.cells.b.a.b.zp var3) throws Exception {
      if (!var1.e().B().E()) {
         if (var1.k() == 2) {
            f(var0, var1);
         } else {
            zig var4 = var1.e();
            zbvd var5 = var4.S();
            com.aspose.cells.b.a.b.zo[] var6 = zic.c(var4);
            com.aspose.cells.b.a.b.zo var7 = zic.e(var4);
            double var8;
            if (var4.G().p()) {
               var8 = var4.G().z() - var4.G().s();
            } else {
               var8 = var4.G().s() - var4.G().D();
            }

            int var10 = (int)(var8 / (var4.G().z() - var4.G().D()) * (double)var4.S().g());
            if (var10 != 0) {
               var1.l().a(var6[0].d() + (float)var10, var6[0].e(), var6[0].d() + (float)var10, var6[0].e() - var4.S().i());
            }

            if (var4.p() >= 0) {
               var1.l().a(var6[0].d(), var6[0].e(), var6[0].d(), var6[0].e() - var4.S().i());
            }

            if (var1.I() == 2) {
               var6[0].a(var6[0].d() + (float)var10);
            }

            float var11 = 0.0F;
            float var12 = (float)var1.J().k();
            if (var1.I() != 3) {
               var12 += (float)(var1.aa() + var1.ab());
            }

            byte var13 = 8;
            var11 = var6[0].d() - var1.i - var12;
            float var14 = var4.S().i() / (float)var2;
            zbtk var15 = var1.J();
            ArrayList var16 = var1.e().z().c();
            boolean var17 = false;
            if (var15.h() && var16.size() > 0) {
               var17 = true;
            }

            String var22;
            for(int var18 = 0; var18 < var2; ++var18) {
               double var20 = (double)((float)var18 * var14);
               var20 += (double)(var14 / 2.0F);
               float var19;
               if (var1.p()) {
                  var19 = (float)((double)(var6[0].e() - var4.S().i()) + var20) - var1.h / 2.0F;
               } else {
                  var19 = (float)((double)var6[0].e() - var20) - var1.h / 2.0F;
               }

               if (var1.I() != 3 && var18 % var1.H() == 0 && var18 < var1.l.size()) {
                  var22 = "";
                  Color var23 = var15.g();
                  if (!var17) {
                     var22 = a(var1, var1.l.get(var18));
                     var23 = zpw.a(var1.l.get(var18), var15.b(), var23);
                  } else {
                     String var24 = "";
                     boolean var25 = false;
                     var24 = var18 < var16.size() ? ((zfp)var16.get(var18)).c() : "";
                     var25 = var18 < var16.size() ? ((zfp)var16.get(var18)).b() : false;
                     var22 = zpw.a(var4.al(), var1.l.get(var18), var24, var25);
                     var23 = zpw.a(var1.l.get(var18), var24, var23);
                  }

                  com.aspose.cells.b.a.b.zq var30 = new com.aspose.cells.b.a.b.zq(var11, var19, var1.i, var1.h);
                  a(var0, com.aspose.cells.b.a.b.zp.a(var30), var22, var15.d(), var15.a(), var23, var13, 1);
               }
            }

            b(var0, var1, var10, var2);
            boolean var27 = var4.G().p();
            ArrayList[] var28 = var4.z().e();
            if (var28 != null && var28.length > 0 && var16.size() > 0 && var1.I() != 3) {
               ArrayList var29 = var28[0];
               zfp var21 = (zfp)var29.get(0);
               var22 = zpw.a(var4.al(), var21.a(), var21.c(), var21.b());
               zbsq.a(var1.e().ap(), var22, 0, var15.a(), (com.aspose.cells.b.a.b.zt)(new com.aspose.cells.b.a.b.zt((float)var3.e(), (float)var3.f())), 1, 1);
               float var31 = 0.0F;
               if (!var1.p()) {
                  var31 = var6[0].e();
               } else {
                  var31 = var6[0].e() - var4.S().i();
               }

               var11 = var6[0].d() - var12 * (float)(var28.length + 1) - var1.f;
               float var32 = var6[0].d();
               boolean var26 = true;
               a(var0, var28, var26, var1, var15, (double)var14, var3, var12, var32, var11, var31);
            }

         }
      }
   }

   private static void f(zn var0, zbp var1) {
      zig var2 = var1.e();
      zbvd var3 = var2.S();
      com.aspose.cells.b.a.b.zo[] var4 = zic.c(var2);
      com.aspose.cells.b.a.b.zo var5 = zic.e(var2);
      double var6;
      if (var2.G().p()) {
         var6 = var2.G().z() - var2.G().s();
      } else {
         var6 = var2.G().s() - var2.G().D();
      }

      int var8 = (int)(var6 / (var2.G().z() - var2.G().D()) * (double)var2.S().g());
      if (var8 != 0) {
         var1.l().a(var4[0].d() + (float)var8, var4[0].e(), var4[0].d() + (float)var8, var4[0].e() - var2.S().i());
      }

      if (var2.p() >= 0) {
         var1.l().a(var4[0].d(), var4[0].e(), var4[0].d(), var4[0].e() - var2.S().i());
      }

      if (var1.I() == 2) {
         var4[0].a(var4[0].d() + (float)var8);
      }

      ArrayList var9 = var1.l;
      float var10 = 0.0F;
      float var11 = (float)var1.J().k();
      float var12 = var1.g / 2.0F;
      byte var13 = 8;
      var10 = var4[0].d() - var1.f - var11;
      zbtk var14 = var1.J();
      ArrayList var15 = var1.e().z().c();
      boolean var16 = false;
      if (var14.h() && var15.size() > 0) {
         var16 = true;
      }

      int var17 = (int)var1.z();
      int var18 = (int)var1.D();
      int var19 = var1.j();
      int var20 = a(var19, var17, var18, var1.e().X()) + 1;
      float var21 = var3.i() / (float)var20;

      for(int var22 = 0; var22 < var9.size(); ++var22) {
         int var23 = com.aspose.cells.b.a.ze.f(var1.l.get(var22));
         int var24 = a(var19, var23, var18, var1.e().X());
         float var25 = var21 * (float)var24;
         var25 += var21 / 2.0F;
         float var26;
         if (var1.p()) {
            var26 = var4[0].e() - var2.S().i() + var25;
         } else {
            var26 = var4[0].e() - var25;
         }

         if (var1.I() != 3 && var22 % var1.H() == 0 && var22 < var1.l.size()) {
            String var27 = "";
            Color var28 = var14.g();
            if (!var16) {
               var27 = a(var1, var1.l.get(var22));
               var28 = zpw.a(var1.l.get(var22), var14.b(), var28);
            } else {
               String var29 = "";
               boolean var30 = false;
               var29 = ((zfp)var15.get(0)).c();
               var30 = ((zfp)var15.get(0)).b();
               var27 = zpw.a(var2.al(), var1.l.get(var22), var29, var30);
               var28 = zpw.a(var1.l.get(var22), var29, var28);
            }

            com.aspose.cells.b.a.b.zq var31 = new com.aspose.cells.b.a.b.zq(var10, var26 - var12, var1.f, var1.g);
            a(var0, com.aspose.cells.b.a.b.zp.a(var31), var27, var14.d(), var14.a(), var28, var13, 1);
         }
      }

      a(var0, var8, var1);
   }

   private static void b(zn var0, zbp var1, int var2, int var3) {
      zig var4 = var1.e();
      zbvd var5 = var4.S();
      if ((var1.E() != 2 || var1.F() != 2) && var1.l().g()) {
         com.aspose.cells.b.a.b.zo[] var6 = zic.c(var4);

         while(true) {
            boolean var10 = false;
            boolean var11 = false;
            switch(var1.E()) {
            case 0:
               var10 = true;
               var11 = true;
               break;
            case 1:
               var10 = true;
            case 2:
            default:
               break;
            case 3:
               var11 = true;
            }

            boolean var12 = false;
            boolean var13 = false;
            switch(var1.F()) {
            case 0:
               var12 = true;
               var13 = true;
               break;
            case 1:
               var12 = true;
            case 2:
            default:
               break;
            case 3:
               var13 = true;
            }

            com.aspose.cells.b.a.b.zo var8;
            com.aspose.cells.b.a.b.zo var9;
            if (var1.p()) {
               var8 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e() - var5.i());
               var9 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e());
            } else {
               var8 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e());
               var9 = new com.aspose.cells.b.a.b.zo(var6[0].d(), var6[0].e() - var5.i());
            }

            float var7 = (var9.e() - var8.e()) / (float)var3;
            float var14 = var8.d();

            float var15;
            float var16;
            for(var15 = var8.e(); var8.e() <= var15 && var15 <= var9.e() || var8.e() >= var15 && var15 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var9.e()); var15 += (float)var1.Q() * var7) {
               if (var8.e() <= var15 && var15 <= var9.e() || var8.e() >= var15 && var15 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var10) {
                     var1.l().a(var14, var15, var14 + (float)var1.aa(), var15);
                  }

                  if (var11) {
                     var1.l().a(var14 - (float)var1.aa(), var15, var14, var15);
                  }
               }

               var16 = var15 - (float)var1.Q() * var7 / 2.0F;
               if (var8.e() <= var16 && var16 <= var9.e() || var8.e() >= var16 && var16 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var12) {
                     var1.l().a(var14, var16, var14 + (float)var1.aa(), var16);
                  }

                  if (var13) {
                     var1.l().a(var14 - (float)var1.aa(), var16, var14, var16);
                  }
               }
            }

            if ((float)var1.Q() * var7 > var9.e() - var8.e()) {
               var16 = var15 - (float)var1.Q() * var7 / 2.0F;
               if (var8.e() <= var16 && var16 <= var9.e() || var8.e() >= var16 && var16 >= var9.e() || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var8.e()) || com.aspose.cells.b.a.zq.a((double)var16) == com.aspose.cells.b.a.zq.a((double)var9.e())) {
                  if (var12) {
                     var1.l().a(var14, var16, var14 + (float)var1.aa(), var16);
                  }

                  if (var13) {
                     var1.l().a(var14 - (float)var1.aa(), var16, var14, var16);
                  }
               }
            }

            if (var2 <= 0) {
               return;
            }

            var6[0].a(var6[0].d() + (float)var2);
            var2 = 0;
         }
      }
   }

   private static void a(zn var0, int var1, zbp var2) {
      zig var3 = var2.e();
      zbvd var4 = var3.S();
      if ((var2.E() != 2 || var2.F() != 2) && var2.l().g()) {
         com.aspose.cells.b.a.b.zo[] var5 = zic.c(var3);

         while(true) {
            boolean var8 = false;
            boolean var9 = false;
            switch(var2.E()) {
            case 0:
               var8 = true;
               var9 = true;
               break;
            case 1:
               var8 = true;
            case 2:
            default:
               break;
            case 3:
               var9 = true;
            }

            com.aspose.cells.b.a.b.zo var6;
            com.aspose.cells.b.a.b.zo var7;
            if (var2.p()) {
               var6 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e() - var4.i());
               var7 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e());
            } else {
               var6 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e());
               var7 = new com.aspose.cells.b.a.b.zo(var5[0].d(), var5[0].e() - var4.i());
            }

            int var12 = var2.j();
            double var10;
            if (var2.g() == 0 && var2.k() == 2) {
               var10 = (double)(a(var12, (int)var2.z(), (int)var2.D(), var2.e().X()) + 1);
            } else {
               var10 = var2.z() - var2.D();
            }

            float var13 = (float)((double)(var7.e() - var6.e()) / var10);
            float var14 = var6.d();

            float var15;
            for(var15 = var6.e(); var6.e() <= var15 && var15 <= var7.e() || var6.e() >= var15 && var15 >= var7.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var6.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var7.e()); var15 += var13 * (float)a(var12, a(var2.j(), var2.y(), (int)var2.x(), (int)var2.D(), var2.e().X()), (int)var2.D(), var2.e().X())) {
               if (var8) {
                  var2.l().a(var14, var15, var14 + (float)var2.aa(), var15);
               }

               if (var9) {
                  var2.l().a(var14 - (float)var2.aa(), var15, var14, var15);
               }
            }

            boolean var16 = false;
            boolean var17 = false;
            switch(var2.F()) {
            case 0:
               var16 = true;
               var17 = true;
               break;
            case 1:
               var16 = true;
            case 2:
            default:
               break;
            case 3:
               var17 = true;
            }

            var14 = var6.d();

            for(var15 = var6.e(); var6.e() <= var15 && var15 <= var7.e() || var6.e() >= var15 && var15 >= var7.e() || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var6.e()) || com.aspose.cells.b.a.zq.a((double)var15) == com.aspose.cells.b.a.zq.a((double)var7.e()); var15 += var13 * (float)a(var12, a(var2.j(), var2.C(), (int)var2.B(), (int)var2.D(), var2.e().X()), (int)var2.D(), var2.e().X())) {
               if (var16) {
                  var2.l().a(var14, var15, var14 + (float)var2.ab(), var15);
               }

               if (var17) {
                  var2.l().a(var14 - (float)var2.ab(), var15, var14, var15);
               }
            }

            if (var1 <= 0) {
               return;
            }

            var5[0].a(var5[0].d() + (float)var1);
            var1 = 0;
         }
      }
   }

   static void c(zn var0, zbp var1) throws Exception {
      if (!var1.e().B().E()) {
         zig var2 = var1.e();
         zbvd var3 = var2.S();
         com.aspose.cells.b.a.b.zo[] var4 = zic.d(var2);
         zbp var5 = var2.G();
         double var6 = var5.V();
         double var8 = var5.W();
         double var10 = var5.X();
         boolean var12 = false;
         if (var5.D() == var5.s()) {
            var12 = true;
         }

         if (var5.p()) {
            var10 = var6 - var10;
         } else {
            var10 -= var8;
         }

         int var13 = (int)(var10 / (var6 - var8) * (double)var2.S().i());
         if (var13 != 0) {
            var1.l().a(var4[0].d(), var4[0].e() - (float)var13, var4[1].d(), var4[1].e() - (float)var13);
         }

         if (var2.p() >= 0) {
            var1.l().a(var4[0].d(), var4[0].e(), var4[1].d(), var4[1].e());
         }

         if (var1.I() == 2) {
            var4[0].b(var4[0].e() - (float)var13);
            var4[1].b(var4[1].e() - (float)var13);
         }

         zbcs var14 = var2.z();
         zbtk var15 = var1.J();
         ArrayList var16 = var2.z().c();
         float var17 = (float)var1.J().k();
         double var18 = var4[1].d() == var4[0].d() ? 1.5707963267948966D : Math.atan((double)Math.abs((var4[0].e() - var4[1].e()) / (var4[1].d() - var4[0].d())));
         double var20 = 180.0D * var18 / 3.141592653589793D;
         float var22 = (var4[1].d() - var4[0].d()) / (float)var1.l.size();
         float var23 = (var4[1].e() - var4[0].e()) / (float)var1.l.size();

         for(int var24 = 0; var24 < var1.l.size(); ++var24) {
            int var25 = var24;
            if (var1.p()) {
               var25 = var1.l.size() - 1 - var24;
            }

            String var26 = "";
            var26 = a(var1, var1.l.get(var25));
            if (var1.I() != 3 && var25 % var1.H() == 0) {
               com.aspose.cells.b.a.b.zq var27 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, 0.0F, 0.0F);
               if (var2.p() >= 0) {
                  if (var4[0].e() == var4[1].e()) {
                     var27.a(var22 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var22 : var4[0].d() + (float)var24 * var22);
                     var27.b(var4[0].e() + var17);
                     var27.c(Math.abs(var22 * (float)var1.H()));
                     var27.d(var1.g);
                  } else if (var18 <= 0.7853981633974483D) {
                     var27.a(var22 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var22 : var4[0].d() + (float)var24 * var22);
                     var27.b(var23 > 0.0F ? var4[0].e() + (float)(var24 + 1) * var23 : var4[0].e() + (float)var24 * var23);
                     var27.c(Math.abs(var22));
                     var27.d(var1.g);
                  } else {
                     var27.a(var23 > 0.0F ? var4[0].d() + (float)var24 * var22 : var4[0].d() + (float)(var24 + 1) * var22);
                     var27.a(var22 * var23 <= 0.0F ? var27.f() + var17 * (float)Math.sin(var18) : var27.f() - var17 * (float)Math.sin(var18) - var1.f);
                     var27.b(var23 > 0.0F ? var4[0].e() + (float)var24 * var23 : var4[0].e() + (float)(var24 + 1) * var23);
                     var27.b(var27.g() + (Math.abs(var23) - var1.g) * (float)Math.sin(var18) / 2.0F);
                     var27.c(var1.f);
                     var27.d(var1.g);
                  }
               } else if (var2.p() < 0 && !var12 && var1.I() == 2) {
                  if (var4[0].e() == var4[1].e()) {
                     var27.a(var22 > 0.0F ? var4[0].d() + (float)var24 * var22 : var4[0].d() + (float)(var24 + 1) * var22);
                     var27.b(var4[0].e() - var1.g - var17);
                     var27.c(Math.abs(var22));
                     var27.d(var1.g);
                  } else if (var18 <= 0.7853981633974483D) {
                     var27.a(var22 < 0.0F ? var4[0].d() + (float)(var24 + 1) * var22 : var4[0].d() + (float)var24 * var22);
                     var27.b(var23 < 0.0F ? var4[0].e() + (float)(var24 + 1) * var23 : var4[0].e() + (float)var24 * var23);
                     var27.b(var27.g() - var1.g);
                     var27.c(Math.abs(var22));
                     var27.d(var1.g);
                  } else {
                     var27.a(var23 < 0.0F ? var4[0].d() + (float)var24 * var22 : var4[0].d() + (float)(var24 + 1) * var22);
                     var27.a(var22 * var23 >= 0.0F ? var27.f() + var17 * (float)Math.sin(var18) : var27.f() - var17 * (float)Math.sin(var18) - var1.f);
                     var27.b(var23 < 0.0F ? var4[0].e() + (float)var24 * var23 : var4[0].e() + (float)(var24 + 1) * var23);
                     var27.b(var27.g() - (Math.abs(var23) - var1.g) * (float)Math.sin(var18) / 2.0F);
                     var27.b(var27.g() - var1.g);
                     var27.c(var1.f);
                     var27.d(var1.g);
                  }
               }

               var27.c(var1.f);
               var27.d(var1.g);
               a(var0, com.aspose.cells.b.a.b.zp.a(var27), var26, var15.d(), var15.a(), var15.g(), 1, 1);
            }
         }

         a(var0, var1, var13, var1.l.size());
      }
   }
}
